lkml.org 
[lkml]   [2005]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI: fix an oops in some pci devices on hotplug remove when their resources are being freed.
On Fri, Apr 01, 2005 at 03:47:50PM -0800, Greg KH wrote:
> PCI: fix an oops in some pci devices on hotplug remove when their resources are being freed.
>
> As reported by Prarit Bhargava <prarit@sgi.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> diff -Nru a/drivers/pci/remove.c b/drivers/pci/remove.c
> for (i = 0; i < PCI_NUM_RESOURCES; i++) {
> struct resource *res = dev->resource + i;
> - if (res->parent)
> + if (res && res->parent)
> release_resource(res);

I can't believe this fixes anything. How can res possibly be NULL here?
It's a pointer into a pci_dev.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.314 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site