Skip to content
Commit 626b13f0 authored by Damien Le Moal's avatar Damien Le Moal
Browse files

scsi: Do not rescan devices with a suspended queue

Commit ff48b378 ("scsi: Do not attempt to rescan suspended devices")
modified scsi_rescan_device() to avoid attempting rescanning a suspended
device. However, the modification added a check to verify that a SCSI
device is in the running state without checking if the device request
queue (in the case of block device) is also running, thus allowing the
exectuion of internal requests. Without checking the device request
queue, commit ff48b378

 fix is incomplete and deadlocks on resume can
still happen. Use blk_queue_pm_only() to check if the device request
queue allows executing commands in addition to checking the SCSI device
state.

Reported-by: default avatarPetr Tesarik <petr@tesarici.cz>
Fixes: ff48b378

 ("scsi: Do not attempt to rescan suspended devices")
Cc: stable@vger.kernel.org
Tested-by: default avatarPetr Tesarik <petr@tesarici.cz>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
parent 0c1e81d0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment