Re: [PATCH v4] scsi: avoid a permanent stop of the scsi device's request queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Wei" == Wei Fang <fangwei1@xxxxxxxxxx> writes:

Wei> A race between scanning and fc_remote_port_delete() may result in a
Wei> permanent stop if the device gets blocked before
Wei> scsi_sysfs_add_sdev() and unblocked after.  The reason is that
Wei> blocking a device sets both the SDEV_BLOCKED state and the
Wei> QUEUE_FLAG_STOPPED.  However, scsi_sysfs_add_sdev() unconditionally
Wei> sets SDEV_RUNNING which causes the device to be ignored by
Wei> scsi_target_unblock() and thus never have its QUEUE_FLAG_STOPPED
Wei> cleared leading to a device which is apparently running but has a
Wei> stopped queue.

Wei> We actually have two places where SDEV_RUNNING is set: once in
Wei> scsi_add_lun() which respects the blocked flag and once in
Wei> scsi_sysfs_add_sdev() which doesn't.  Since the second set is
Wei> entirely spurious, simply remove it to fix the problem.

Applied to 4.10/scsi-fixes.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux