virtio-scsi: fix various bad behavior on aborted requests
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Jun 2014 11:34:58 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 18:18:23 +0000 (11:18 -0700)
commit5b827636a4492d98c6cb66f68c567cd45f683264
treeb00eda3b4c1c056640cd7d20b10faf798c3dfdfa
parent2f0ca22f63025abeb922392b927b68d8831b251e
virtio-scsi: fix various bad behavior on aborted requests

commit 8faeb529b2dabb9df691d614dda18910a43d05c9 upstream.

Even though the virtio-scsi spec guarantees that all requests related
to the TMF will have been completed by the time the TMF itself completes,
the request queue's callback might not have run yet.  This causes requests
to be completed more than once, and as a result triggers a variety of
BUGs or oopses.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/virtio_scsi.c