From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wright Subject: Re: [PATCH] Don't unregister unassigned PCI BAR Date: Wed, 11 Feb 2009 17:35:35 -0800 Message-ID: <20090212013535.GS27684@sequoia.sous-sol.org> References: <20090203115819.GB30234@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from sous-sol.org ([216.99.217.87]:34016 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756118AbZBLBfx (ORCPT ); Wed, 11 Feb 2009 20:35:53 -0500 Content-Disposition: inline In-Reply-To: <20090203115819.GB30234@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: * Gleb Natapov (gleb@redhat.com) wrote: > --- a/qemu/hw/pci.c > +++ b/qemu/hw/pci.c > @@ -213,7 +213,7 @@ static void pci_unregister_io_regions(PCIDevice *pci_dev) > > for(i = 0; i < PCI_NUM_REGIONS; i++) { > r = &pci_dev->io_regions[i]; > - if (!r->size) > + if (!r->size || r->addr == -1) > continue; Without this patch the error path for device assignment will segfault (trying to unregister addr -1). Please consider for maint/2.6.29. thanks, -chris