Page MenuHomeFreeBSD

mrsas: Don't leak a stack pointer value in the softc.
ClosedPublic

Authored by jhb on Dec 7 2022, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 20, 5:04 AM
Unknown Object (File)
Nov 30 2025, 11:17 AM
Unknown Object (File)
Nov 29 2025, 12:24 PM
Unknown Object (File)
Nov 27 2025, 5:04 AM
Unknown Object (File)
Nov 25 2025, 2:48 PM
Unknown Object (File)
Nov 25 2025, 3:49 AM
Unknown Object (File)
Nov 20 2025, 4:58 AM
Unknown Object (File)
Nov 6 2025, 8:18 AM
Subscribers
None

Details

Summary

mrsas_issue_blocked_cmd stores a pointer to an on-stack variable
in its softc so that the driver can call wakeup() on the correct
pointer. Once the loop around tsleep() has finished however, the
pointer is no longer needed and any further use would be invalid.
Clear sc->chan to NULL after the loop.

Reported by: GCC -Wdangling-pointer

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable