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)
Wed, Jul 22, 12:49 PM
Unknown Object (File)
Mon, Jul 6, 2:06 AM
Unknown Object (File)
Sat, Jun 27, 1:41 AM
Unknown Object (File)
Wed, Jun 24, 11:45 PM
Unknown Object (File)
Jun 17 2026, 8:55 AM
Unknown Object (File)
May 23 2026, 6:01 PM
Unknown Object (File)
May 13 2026, 9:15 AM
Unknown Object (File)
May 13 2026, 1:30 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48645
Build 45531: arc lint + arc unit