Page MenuHomeFreeBSD

ufshci: run the controller fail path only once
ClosedPublic

Authored by jaeyoon on Aug 19 2026, 5:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 5, 1:17 AM
Unknown Object (File)
Sun, Oct 4, 7:53 AM
Unknown Object (File)
Sun, Oct 4, 4:08 AM
Unknown Object (File)
Sat, Oct 3, 6:34 AM
Unknown Object (File)
Wed, Sep 30, 8:04 PM
Unknown Object (File)
Wed, Sep 30, 8:04 PM
Unknown Object (File)
Wed, Sep 30, 5:51 PM
Unknown Object (File)
Mon, Sep 28, 8:51 AM
Subscribers
None

Details

Summary

Two threads could run ufshci_ctrlr_fail() at the same time.
Each one walked the queues and completed the same trackers
again, which caused a double free and a panic.

Turn is_failed into an atomic gate, so only the first caller
walks the queues. The reset task now returns early on a failed
controller instead of re-enabling it.

Sponsored by: Samsung Electronics

Diff Detail

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