qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 26/29] blkdebug: Delete BH in bdrv_aio_cancel


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 26/29] blkdebug: Delete BH in bdrv_aio_cancel
Date: Fri, 22 Aug 2014 16:51:50 +0200

From: Fam Zheng <address@hidden>

Otherwise error_callback_bh will access the already released acb.

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

diff --git a/block/blkdebug.c b/block/blkdebug.c
index 95b7244..69b330e 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);
 }
 
-- 
1.8.3.1




reply via email to

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