From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 10 Mar 2005 23:23:57 +0000 Subject: Re: Latest bk kernel does not properly free PCI IO & MEM allocations Message-Id: <20050310232357.GA22701@kroah.com> List-Id: References: <422F42A9.7050009@sgi.com> In-Reply-To: <422F42A9.7050009@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Mar 10, 2005 at 01:50:24PM -0500, Prarit Bhargava wrote: > > > I'm close to what I think an appropriate solution is. I could just remove > the erroneous call to pci_free_resources, however, I believe that this may > cause some drivers (that are dependent on the pci_free_resources call) to > break. > > Since pci_free_resources is a legacy (deprecated?) call that we should > modify the code such that release_resources sets the appropriate > pci_dev->res pointers to null, and pci_free_resources only attempts to > free a resource if the pointer is not NULL. pci_free_resources is not a legacy call, it's a function internal to the pci core. Does the following patch fix the issue for you? thanks, greg k-h === drivers/pci/remove.c 1.12 vs edited ==--- 1.12/drivers/pci/remove.c 2005-01-18 12:22:39 -08:00 +++ edited/drivers/pci/remove.c 2005-03-10 15:22:52 -08:00 @@ -19,7 +19,7 @@ static void pci_free_resources(struct pc pci_cleanup_rom(dev); for (i = 0; i < PCI_NUM_RESOURCES; i++) { struct resource *res = dev->resource + i; - if (res->parent) + if (res && res->parent) release_resource(res); } } ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel