From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJAmk-0008BM-G5 for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:31:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJAmf-00083O-3V for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:31:57 -0400 Received: from [199.232.76.173] (port=39655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJAme-000830-Vi for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:31:53 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59756) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJAme-0003xm-5l for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:31:52 -0400 Message-ID: <4A411F9B.5020508@redhat.com> Date: Tue, 23 Jun 2009 21:31:55 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs References: <1245763236-23464-1-git-send-email-avi@redhat.com> <20090623165006.GC27211@lst.de> <4A41095D.7070608@redhat.com> <20090623182622.GA5804@lst.de> In-Reply-To: <20090623182622.GA5804@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org 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 > > 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.