Page MenuHomeFreeBSD

ufshci: read UIC command results while holding the lock
ClosedPublic

Authored by jaeyoon on Wed, Aug 5, 8:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 30, 11:04 AM
Unknown Object (File)
Fri, Aug 28, 4:15 PM
Unknown Object (File)
Fri, Aug 28, 9:01 AM
Unknown Object (File)
Thu, Aug 27, 10:37 PM
Unknown Object (File)
Tue, Aug 25, 1:35 PM
Unknown Object (File)
Sun, Aug 23, 1:12 AM
Unknown Object (File)
Sun, Aug 23, 1:08 AM
Unknown Object (File)
Sat, Aug 22, 3:29 AM
Subscribers
None

Details

Summary

The UIC result registers (UICCMDARG2/3) are only valid between a
command's completion and the next command's submission. They were read
after uic_cmd_lock was dropped, so a concurrent UIC submitter could
overwrite them in between. Read them into locals before releasing the
lock.

Also mask the generic error code to its [7:0] field when checking it,
so unrelated bits in UICCMDARG2 (such as the attribute set type echoed
for DME_SET) cannot be mistaken for an error.

Sponsored by: Samsung Electronics

Diff Detail

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