From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init() Date: Tue, 11 May 2010 11:36:25 +0200 Message-ID: <4BE92519.9070400@redhat.com> References: <20100510150016.15398.36521.stgit@virtlab9.virt.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alex Williamson , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Markus Armbruster Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757745Ab0EKJgc (ORCPT ); Tue, 11 May 2010 05:36:32 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/11/10 11:25, Markus Armbruster wrote: > Alex Williamson writes: > >> If the init function of a device fails, as might happen with device >> assignment, we never undo the work done by do_pci_register_device(). >> This not only causes a bit of a memory leak, but also leaves a bogus >> pointer in the bus devices array that can cause a segfault or >> garbage data from 'info pci'. >> >> Signed-off-by: Alex Williamson > > Looks good to me. Gerd? Yes, looks fine. cheers, Gerd