From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS6UG-0003yg-0a for qemu-devel@nongnu.org; Wed, 09 May 2012 08:59:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SS6U9-0002Np-QR for qemu-devel@nongnu.org; Wed, 09 May 2012 08:59:23 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:62125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS6U9-0002Ng-He for qemu-devel@nongnu.org; Wed, 09 May 2012 08:59:17 -0400 Received: by pbbro12 with SMTP id ro12so614155pbb.4 for ; Wed, 09 May 2012 05:59:15 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FAA6A1B.7050406@redhat.com> Date: Wed, 09 May 2012 14:59:07 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1336488722-13120-1-git-send-email-pbonzini@redhat.com> <1336488722-13120-5-git-send-email-pbonzini@redhat.com> <4FAA617D.1030908@redhat.com> In-Reply-To: <4FAA617D.1030908@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1 04/22] block: fully delete bs->file when closing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Il 09/05/2012 14:22, Kevin Wolf ha scritto: > Am 08.05.2012 16:51, schrieb Paolo Bonzini: >> We are reusing bs->file across close/open, which may not cause any >> known bugs but is a recipe for trouble. Prefer bdrv_delete, and >> enjoy the new invariant in the implementation of bdrv_delete. >> >> Signed-off-by: Paolo Bonzini > > I think bs->file is changed during bdrv_open() for all block drivers > that make use of it. We do however leak the old bs->file then. Right, bdrv_open_common has bs->file = NULL. See also patch 9 in the series... Paolo