ChangeSet 1.2181.16.7, 2005/03/17 10:30:46-08:00, [email protected]
PCI: fix an oops in some pci devices on hotplug remove when their resources are being freed.
As reported by Prarit Bhargava <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/pci/remove.c | 2 +-
kernel/resource.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff -Nru a/drivers/pci/remove.c b/drivers/pci/remove.c
--- a/drivers/pci/remove.c 2005-04-01 15:37:58 -08:00
+++ b/drivers/pci/remove.c 2005-04-01 15:37:58 -08:00
@@ -19,7 +19,7 @@
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);
}
}
diff -Nru a/kernel/resource.c b/kernel/resource.c
--- a/kernel/resource.c 2005-04-01 15:37:58 -08:00
+++ b/kernel/resource.c 2005-04-01 15:37:58 -08:00
@@ -505,6 +505,7 @@
*p = res->sibling;
write_unlock(&resource_lock);
kfree(res);
+ res = NULL;
return;
}
p = &res->sibling;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]