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:
Can Guo <cang@codeaurora.org>
Loading
Please register or sign in to comment