Re: [PATCH v2] virtio-scsi: Fix the race condition in virtscsi_handle_event

2015-01-06 Thread Fam Zheng
On Tue, 01/06 11:35, Michael S. Tsirkin wrote: > On Tue, Jan 06, 2015 at 03:33:36PM +0800, Fam Zheng wrote: > > There is a race condition in virtscsi_handle_event, when many device > > hotplug/unplug events flush in quickly. > > > > The scsi_remove_device in virtscsi_handle_transport_reset may tri

Re: [PATCH v2] virtio-scsi: Fix the race condition in virtscsi_handle_event

2015-01-06 Thread Michael S. Tsirkin
On Tue, Jan 06, 2015 at 03:33:36PM +0800, Fam Zheng wrote: > There is a race condition in virtscsi_handle_event, when many device > hotplug/unplug events flush in quickly. > > The scsi_remove_device in virtscsi_handle_transport_reset may trigger > the BUG_ON in scsi_target_reap, because the state

Re: [PATCH v2] virtio-scsi: Fix the race condition in virtscsi_handle_event

2015-01-06 Thread Venkatesh Srinivas
On Mon, Jan 5, 2015 at 11:33 PM, Fam Zheng wrote: > There is a race condition in virtscsi_handle_event, when many device > hotplug/unplug events flush in quickly. > > The scsi_remove_device in virtscsi_handle_transport_reset may trigger > the BUG_ON in scsi_target_reap, because the state is altere

[PATCH v2] virtio-scsi: Fix the race condition in virtscsi_handle_event

2015-01-05 Thread Fam Zheng
There is a race condition in virtscsi_handle_event, when many device hotplug/unplug events flush in quickly. The scsi_remove_device in virtscsi_handle_transport_reset may trigger the BUG_ON in scsi_target_reap, because the state is altered behind it, probably by scsi_scan_host of another event. I'