Hello, Bart. On Fri, Oct 26, 2012 at 02:05:01PM +0200, Bart Van Assche wrote: > The SCSI core maintains a "starved list" per SCSI host. This is a > list of devices for which one or more requests have been queued > but that have not yet been passed to the SCSI LLD. The function > scsi_run_queue() examines all SCSI devices on the starved list. New paragraph. > Since scsi_remove_device() can be invoked concurrently with > scsi_run_queue() it is important to avoid that a SCSI device is > accessed by that function after it has been freed. New paragraph. > Avoid that the > sdev reference count can drop to zero before the queue is run by > scsi_run_queue() by inserting a get_device() / put_device() pair > in that function. Move the code for removing a device from the > starved list from scsi_device_dev_release_usercontext() to > __scsi_remove_device() such that it is guaranteed that the newly > added get_device() call succeeds. > > Reported-and-tested-by: Chanho Min <chanho.min@xxxxxxx> > Reference: http://lkml.org/lkml/2012/8/2/96 > Cc: Jens Axboe <axboe@xxxxxxxxx> > Cc: Tejun Heo <tj@xxxxxxxxxx> > Reviewed-by: Mike Christie <michaelc@xxxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Heh, for some reason, the commit message is a hard read for me but I think it should do. Acked-by: Tejun Heo <tj@xxxxxxxxxx> Thanks! -- tejun -- 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