summaryrefslogtreecommitdiffstats
path: root/scripts/split-man.pl
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2021-12-20 19:21:26 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-12-22 23:38:29 -0500
commit6e1fcab00a23f7fe9f4fe9704905a790efa1eeab (patch)
tree2f77bf5e265dff4c8297e4defdc012dd41a38a6e /scripts/split-man.pl
parent6cc739087784160eff296c7fbd7a95b209f44ba5 (diff)
downloadlinux-6e1fcab00a23f7fe9f4fe9704905a790efa1eeab.tar.gz
linux-6e1fcab00a23f7fe9f4fe9704905a790efa1eeab.tar.bz2
linux-6e1fcab00a23f7fe9f4fe9704905a790efa1eeab.zip
scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume()
John Garry reported a deadlock that occurs when trying to access a runtime-suspended SATA device. For obscure reasons, the rescan procedure causes the link to be hard-reset, which disconnects the device. The rescan tries to carry out a runtime resume when accessing the device. scsi_rescan_device() holds the SCSI device lock and won't release it until it can put commands onto the device's block queue. This can't happen until the queue is successfully runtime-resumed or the device is unregistered. But the runtime resume fails because the device is disconnected, and __scsi_remove_device() can't do the unregistration because it can't get the device lock. The best way to resolve this deadlock appears to be to allow the block queue to start running again even after an unsuccessful runtime resume. The idea is that the driver or the SCSI error handler will need to be able to use the queue to resolve the runtime resume failure. This patch removes the err argument to blk_post_runtime_resume() and makes the routine act as though the resume was successful always. This fixes the deadlock. Link: https://lore.kernel.org/r/1639999298-244569-4-git-send-email-chenxiang66@hisilicon.com Fixes: e27829dc92e5 ("scsi: serialize ->rescan against ->remove") Reported-and-tested-by: John Garry <john.garry@huawei.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/split-man.pl')
0 files changed, 0 insertions, 0 deletions