Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d8f9875c authored by Can Guo's avatar Can Guo Committed by Gerrit - the friendly Code Review server
Browse files

scsi: ufs: fix a race condition between clock scaling and UFS card removal



During card removal, if clock scaling is ongoing, the hibern8 enter/exit
in the scaling path may fail, if so, the scaling exits with the write
semaphore held. Then in the card removal path, if it tries to queue any
tasks to the UFS host, such as when remove the scsi devices, it will wait
for the read semaphore, causing a race condition. This change fixes it by
releasing the write semaphore if clock scaling fails.

Change-Id: Id653507bd914188bb4e52366bd99712e186f7af0
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 485a2d40
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment