Commit 36afc451599175eb8f03f1962de74e7f7a8af4db
Committed by
Anthony Liguori
1 parent
0884657b
block: Clean up after deleting BHs
Commit 6a7ad299 ("Call qemu_bh_delete at bdrv_aio_bh_cb") deletes emulated aio bottom halves to prevent endless accumulation. However, it leaves a stale ->bh pointer, which is then waited on when the aio is reused. Zeroing the pointer fixes the issue, allowing vmdk format images to be used. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
2 additions
and
0 deletions
block.c
... | ... | @@ -1374,6 +1374,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB *blockacb) |
1374 | 1374 | { |
1375 | 1375 | BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb; |
1376 | 1376 | qemu_bh_delete(acb->bh); |
1377 | + acb->bh = NULL; | |
1377 | 1378 | qemu_aio_release(acb); |
1378 | 1379 | } |
1379 | 1380 | |
... | ... | @@ -1391,6 +1392,7 @@ static void bdrv_aio_bh_cb(void *opaque) |
1391 | 1392 | qemu_vfree(acb->bounce); |
1392 | 1393 | acb->common.cb(acb->common.opaque, acb->ret); |
1393 | 1394 | qemu_bh_delete(acb->bh); |
1395 | + acb->bh = NULL; | |
1394 | 1396 | qemu_aio_release(acb); |
1395 | 1397 | } |
1396 | 1398 | ... | ... |