diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2023-10-04 17:50:49 +0900 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-10-10 14:42:22 +0900 |
commit | 626b13f015e080e434b1dee9a0c116ddbf4fb695 (patch) | |
tree | 7936c761dca08915b811c09fcbe9573cbc7203f5 /lib/math/gcd.c | |
parent | 0c1e81d0b5ebd5813536dd5fcf5966ad043f37dc (diff) |
scsi: Do not rescan devices with a suspended queue
Commit ff48b37802e5 ("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 ff48b37802e5 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: Petr Tesarik <petr@tesarici.cz>
Fixes: ff48b37802e5 ("scsi: Do not attempt to rescan suspended devices")
Cc: stable@vger.kernel.org
Tested-by: Petr Tesarik <petr@tesarici.cz>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'lib/math/gcd.c')
0 files changed, 0 insertions, 0 deletions