diff options
| author | Wei Fang <[email protected]> | 2016-12-13 01:25:21 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2016-12-14 20:51:17 +0000 |
| commit | d2a145252c52792bc59e4767b486b26c430af4bb (patch) | |
| tree | 1e863d6cf6fc76ceb9abbbc8e5b70a9d82aa35c6 /lib/timerqueue.c | |
| parent | scsi: mpt3sas: Recognize and act on iopriority info (diff) | |
| download | kernel-d2a145252c52792bc59e4767b486b26c430af4bb.tar.gz kernel-d2a145252c52792bc59e4767b486b26c430af4bb.zip | |
scsi: avoid a permanent stop of the scsi device's request queue
A race between scanning and fc_remote_port_delete() may result in a
permanent stop if the device gets blocked before scsi_sysfs_add_sdev()
and unblocked after. The reason is that blocking a device sets both the
SDEV_BLOCKED state and the QUEUE_FLAG_STOPPED. However,
scsi_sysfs_add_sdev() unconditionally sets SDEV_RUNNING which causes the
device to be ignored by scsi_target_unblock() and thus never have its
QUEUE_FLAG_STOPPED cleared leading to a device which is apparently
running but has a stopped queue.
We actually have two places where SDEV_RUNNING is set: once in
scsi_add_lun() which respects the blocked flag and once in
scsi_sysfs_add_sdev() which doesn't. Since the second set is entirely
spurious, simply remove it to fix the problem.
Cc: <[email protected]>
Reported-by: Zengxi Chen <[email protected]>
Signed-off-by: Wei Fang <[email protected]>
Reviewed-by: Ewan D. Milne <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
