From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34009 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PR4WH-0003OB-BK for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:04:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PR4WB-0004rQ-JW for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:04:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PR4WB-0004qO-Cb for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:04:19 -0500 Message-ID: <4D0241B1.8010300@redhat.com> Date: Fri, 10 Dec 2010 16:05:21 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <20101208160500.GQ22381@us.ibm.com> In-Reply-To: <20101208160500.GQ22381@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] blockdev: check dinfo ptr before using List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ryan Harper Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Am 08.12.2010 17:05, schrieb Ryan Harper: > If a user decides to punish a guest by revoking its block device via > drive_del, and subsequently also attempts to remove the pci device > backing it, and the device is using blockdev_auto_del() then we get a > segfault when we attempt to access dinfo->auto_del.[1] > > The fix is to check if drive_get_by_blockdev() actually returns a valid > dinfo pointer or not. > > 1. (qemu) pci_add auto storage file=images/test01.raw,if=virtio,id=block1,snapshot=on > (qemu) drive_del block1 > (qemu) pci_del 5 > *segfault* > > Signed-off-by: Ryan Harper Thanks, applied to the block branch. Kevin