Re: [PATCH] scsi_sysfs: fix hang when removing scsi device

2017-03-02 Thread Bart Van Assche
On Thu, 2017-03-02 at 16:45 +0200, Israel Rukshin wrote: > The bug reproduce when unloading srp module with one port down. > device_del() hangs when __scsi_remove_device() get scsi_device with > state SDEV_OFFLINE or SDEV_TRANSPORT_OFFLINE. > It hangs because device_del() is trying to send sync cac

[PATCH] scsi_sysfs: fix hang when removing scsi device

2017-03-02 Thread Israel Rukshin
The bug reproduce when unloading srp module with one port down. device_del() hangs when __scsi_remove_device() get scsi_device with state SDEV_OFFLINE or SDEV_TRANSPORT_OFFLINE. It hangs because device_del() is trying to send sync cache command when the device is offline but with SDEV_CANCEL status