Page MenuHomeFreeBSD

ufshci: run the controller fail path only once
ClosedPublic

Authored by jaeyoon on Wed, Aug 19, 5:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 10, 11:36 PM
Unknown Object (File)
Wed, Sep 9, 8:54 AM
Unknown Object (File)
Wed, Sep 9, 5:43 AM
Unknown Object (File)
Wed, Sep 9, 5:03 AM
Unknown Object (File)
Tue, Sep 8, 8:25 PM
Unknown Object (File)
Tue, Sep 8, 5:09 PM
Unknown Object (File)
Tue, Sep 8, 12:43 PM
Unknown Object (File)
Tue, Sep 8, 2:34 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