]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-blk: fix use-after-free while handling scsi commands
authorAvi Kivity <avi@redhat.com>
Mon, 6 Aug 2012 12:49:03 +0000 (15:49 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:36:35 +0000 (15:36 -0500)
commit3b38972743856fbfcee88fc15eb0753977103313
treeaa556632bab6469fd4e264527aea795e0e73007e
parent36ed337845a00240c370bbea782f953a8110d0c0
virtio-blk: fix use-after-free while handling scsi commands

The scsi passthrough handler falls through after completing a
request into the failure path, resulting in a use after free.

Reproducible by running a guest with aio=native on a block device.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 730a9c53b4e52681fcfe31cf38854cbf91e132c7)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio-blk.c