virtio_scsi: fix race on device removal
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 23:52:33 +0000 (10:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2014 23:55:12 +0000 (10:25 +1030)
commite67423c7b4f20c327de533b068907aab33720482
tree48c0db846c0d9ca6bea32f87adfbfebb5b385c2c
parent1fa5b2a784dc52d929432bcc963a0bfb3a74608f
virtio_scsi: fix race on device removal

We cancel event work on device removal, but an interrupt
could trigger immediately after this, and queue it
again.

To fix, set a flag.

Loosely based on patch by Paolo Bonzini

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>
drivers/scsi/virtio_scsi.c