From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [PATCH] qcow2: Fix segfault when qcow2 preallocate fails Date: Tue, 26 Oct 2010 15:48:03 +0200 Message-ID: <4CC6DC13.5090509@redhat.com> References: <4CC6D1EA.7050706@redhat.com> <1288099399-10010-1-git-send-email-stefanha@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , qemu-devel@nongnu.org, Anthony Liguori , Juan Quintela , kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36022 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512Ab0JZNra (ORCPT ); Tue, 26 Oct 2010 09:47:30 -0400 In-Reply-To: <1288099399-10010-1-git-send-email-stefanha@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 26.10.2010 15:23, schrieb Stefan Hajnoczi: > When an image is created with -o preallocate, ensure that we only call > preallocate() if the image was indeed opened successfully. Also use > bdrv_delete() instead of bdrv_close() to avoid leaking the > BlockDriverState structure. > > This fixes the segfault reported at > https://bugzilla.redhat.com/show_bug.cgi?id=646538. > > Signed-off-by: Stefan Hajnoczi Looks good for stable-0.13. In master we'll have the new qcow_create2 implementation as soon as Anthony pulls, so it doesn't apply there. Kevin