On Tue, Jul 12, 2022 at 03:19:33PM -0700, Bart Van Assche wrote: > This patch prevents that the following sequence triggers a kernel crash: > * Deletion of a SCSI device is requested via sysfs. Device removal takes > some time because blk_cleanup_queue() is waiting for the SCSI error > handler. > * The SCSI target associated with that SCSI device is removed. > * scsi_remove_target() returns and its caller frees the resources > associated with the SCSI target. > * The error handler makes progress and invokes an LLD callback that > dereferences the SCSI target pointer. > > Reported-by: Mike Christie <michael.christie@xxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Cc: Mike Christie <michael.christie@xxxxxxxxxx> > Cc: Hannes Reinecke <hare@xxxxxxx> > Cc: John Garry <john.garry@xxxxxxxxxx> > Cc: Li Zhijian <lizhijian@xxxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Looks fine, Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx> Thanks, Ming