qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] blkdebug: Delete BH in bdrv_aio_cancel


From: Fam Zheng
Subject: [Qemu-devel] [PATCH] blkdebug: Delete BH in bdrv_aio_cancel
Date: Fri, 22 Aug 2014 12:45:50 +0800

Otherwise error_callback_bh will access the already released acb.

Signed-off-by: Fam Zheng <address@hidden>
---
 block/blkdebug.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
 }
 
-- 
2.0.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]