linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Latest bk kernel does not properly free PCI IO & MEM allocations
Date: Thu, 10 Mar 2005 23:23:57 +0000	[thread overview]
Message-ID: <20050310232357.GA22701@kroah.com> (raw)
In-Reply-To: <422F42A9.7050009@sgi.com>

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_id\x14396&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

  parent reply	other threads:[~2005-03-10 23:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-09 18:38 Latest bk kernel does not properly free PCI IO & MEM allocations Prarit Bhargava
2005-03-10 15:07 ` Prarit Bhargava
2005-03-10 17:17 ` Greg KH
2005-03-10 18:16 ` Prarit Bhargava
2005-03-10 18:50 ` Prarit Bhargava
2005-03-10 23:23 ` Greg KH [this message]
2005-03-11 21:30 ` Prarit Bhargava
2005-03-12  7:38 ` Greg KH
2005-03-12 17:04 ` prarit
2005-03-13  0:49 ` Re: Latest bk kernel does not properly free PCI IO & MEM prarit
2005-03-15  6:11 ` Re: Latest bk kernel does not properly free PCI IO & MEM allocations Rajesh Shah
2005-03-15 12:55 ` Prarit Bhargava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050310232357.GA22701@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).