diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-10-14 19:52:33 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-10-14 19:55:11 -0400 |
commit | 1fa5b2a784dc52d929432bcc963a0bfb3a74608f (patch) | |
tree | 355e848dfd4805806e9065163e0ac262b53796f7 /drivers/scsi | |
parent | e53fbd11e983e896adaabef2d2f1695d6e0af829 (diff) |
virito_scsi: use freezable WQ for events
Michael S. Tsirkin noticed a race condition:
we reset device on freeze, but system WQ is still
running so it might try adding bufs to a VQ meanwhile.
To fix, switch to handling events from the freezable WQ.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/virtio_scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 6a39896b30dc..29fd44a5d4dd 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
@@ -390,7 +390,7 @@ static void virtscsi_complete_event(struct virtio_scsi *vscsi, void *buf) | |||
390 | { | 390 | { |
391 | struct virtio_scsi_event_node *event_node = buf; | 391 | struct virtio_scsi_event_node *event_node = buf; |
392 | 392 | ||
393 | schedule_work(&event_node->work); | 393 | queue_work(system_freezable_wq, &event_node->work); |
394 | } | 394 | } |
395 | 395 | ||
396 | static void virtscsi_event_done(struct virtqueue *vq) | 396 | static void virtscsi_event_done(struct virtqueue *vq) |