Message ID | 1408682750-12738-1-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
Am 22.08.2014 um 06:45 hat Fam Zheng geschrieben: > Otherwise error_callback_bh will access the already released acb. > > Signed-off-by: Fam Zheng <famz@redhat.com> Cc: qemu-stable@nongnu.org Thanks, applied to the block branch. Kevin
diff --git a/block/blkdebug.c b/block/blkdebug.c index 1586ed9..dac7666 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); }
Otherwise error_callback_bh will access the already released acb. Signed-off-by: Fam Zheng <famz@redhat.com> --- block/blkdebug.c | 4 ++++ 1 file changed, 4 insertions(+)