qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] blkdebug: Delete BH in bdrv_aio_cancel
@ 2014-08-22  4:45 Fam Zheng
  2014-08-22  9:07 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Fam Zheng @ 2014-08-22  4:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi

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(+)

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-22  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22  4:45 [Qemu-devel] [PATCH] blkdebug: Delete BH in bdrv_aio_cancel Fam Zheng
2014-08-22  9:07 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).