Commit 626b13f
committed
scsi: Do not rescan devices with a suspended queue
Commit ff48b37 ("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 ff48b37 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 <[email protected]>
Fixes: ff48b37 ("scsi: Do not attempt to rescan suspended devices")
Cc: [email protected]
Tested-by: Petr Tesarik <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>1 parent 0c1e81d commit 626b13f
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1634 | 1634 | | |
1635 | | - | |
| 1635 | + | |
| 1636 | + | |
1636 | 1637 | | |
1637 | 1638 | | |
1638 | 1639 | | |
| |||
0 commit comments