Page MenuHomeFreeBSD

ufshci: run the controller fail path only once
Needs ReviewPublic

Authored by jaeyoon on Wed, Aug 19, 5:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 19, 7:13 PM
Unknown Object (File)
Wed, Aug 19, 9:07 AM
Unknown Object (File)
Wed, Aug 19, 9:01 AM
Subscribers
None

Details

Reviewers
imp
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