aboutsummaryrefslogtreecommitdiff
path: root/block/blkdebug.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-08-22 12:45:50 +0800
committerKevin Wolf <kwolf@redhat.com>2014-08-22 11:07:00 +0200
commitcbf95a0b117461473f05ab3cce4d01ba2b29e60a (patch)
tree1b889895e4371066236df10aaa179cab6ae35734 /block/blkdebug.c
parent8d9eb33ca0bbb8bca0f1775623ed3cf5f39760cd (diff)
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>
Diffstat (limited to 'block/blkdebug.c')
-rw-r--r--block/blkdebug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 95b72445a7..69b330eced 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -453,6 +453,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);
}