Skip to content

Commit

Permalink
blkdebug: Delete BH in bdrv_aio_cancel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fam Zheng authored and kevmw committed Aug 22, 2014
1 parent 8d9eb33 commit cbf95a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/blkdebug.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit cbf95a0

Please sign in to comment.