summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-08-22 12:45:50 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-09-08 11:23:05 -0500
commitfab7560c352475ebf5ab50be9e327e0eabff1a3b (patch)
treec6cc23e3914733f2cbba571c46113ee2bed2f467
parent16c92cd629f2069c25a8d21ee049f8748adb8a7a (diff)
downloadqemu-fab7560c352475ebf5ab50be9e327e0eabff1a3b.tar.gz
blkdebug: Delete BH in bdrv_aio_cancel
Otherwise error_callback_bh will access the already released acb. Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit cbf95a0b117461473f05ab3cce4d01ba2b29e60a) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--block/blkdebug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index f51407de3f..01b8e73bda 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -449,6 +449,10 @@ static void error_callback_bh(void *opaque)
static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb)
{
BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common);
+ if (acb->bh) {
+ qemu_bh_delete(acb->bh);
+ acb->bh = NULL;
+ }
qemu_aio_release(acb);
}