qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs
Date: Tue, 23 Jun 2009 21:31:55 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2

On 06/23/2009 09:26 PM, Christoph Hellwig wrote:
On Tue, Jun 23, 2009 at 07:57:01PM +0300, Avi Kivity wrote:
I think not having the state of the private acb area cleared over a
free/realloc cycle is pretty dangerous.  Wouldn't it be better to always
clear that space in qemu_aio_get?

Maybe, but that's a bigger change.  Let's start with this (in stable-
too) and rework aio later.

It's actually smaller - half the size to be exact :)

Signed-off-by: Christoph Hellwig<address@hidden>

Index: qemu/block.c
===================================================================
--- qemu.orig/block.c   2009-06-23 20:16:48.283930485 +0200
+++ qemu/block.c        2009-06-23 20:16:57.158834441 +0200
@@ -1515,6 +1515,7 @@ void *qemu_aio_get(AIOPool *pool, BlockD
      acb->bs = bs;
      acb->cb = cb;
      acb->opaque = opaque;
+    memset(acb + 1, 0, pool->aiocb_size - sizeof(BlockDriverAIOCB));
      return acb;
  }

I meant in an omg we have to look at all the consequences way rather than byte count. This patch is somewhat less local.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

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