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:13:59 +0000 (11:13 -0700)
commit58f550fa3177622189c477951c3aff8048fc2e11
tree0baa5efba7acfc59c32fbe22749fa09feebb9966
parent3bf6608abb4e9e8428494798db4dde15cea38c3e
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