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
F175983295: D58944.id185180.diff
Thu, Oct 15, 12:42 AM
Unknown Object (File)
Wed, Oct 14, 1:02 PM
Unknown Object (File)
Tue, Oct 13, 8:43 PM
Unknown Object (File)
Tue, Oct 13, 2:25 PM
Unknown Object (File)
Mon, Oct 12, 6:23 PM
Unknown Object (File)
Mon, Oct 12, 10:31 AM
Unknown Object (File)
Mon, Oct 12, 7:48 AM
Unknown Object (File)
Tue, Oct 6, 6:48 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 75697
Build 72580: arc lint + arc unit