2002-09-29 16:58:08

by Mikael Pettersson

[permalink] [raw]
Subject: [PATCH] 2.5.39 isapnp causes drivers/base/core.c:attach() oops

In 2.5.39, isapnp's call to device_register() causes an oops in
drivers/base/core.c:attach() since the isapnp_device_driver.devices
list isn't initialised. The patch below initialises this list, which
cures the oops but may or may not be the preferred long-term fix.

/Mikael

--- linux-2.5.39/drivers/pnp/isapnp.c.~1~ Sat Sep 28 11:40:04 2002
+++ linux-2.5.39/drivers/pnp/isapnp.c Sun Sep 29 16:41:42 2002
@@ -2288,6 +2288,8 @@
struct pci_bus *card;
struct pci_dev *parent = pci_find_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);

+ INIT_LIST_HEAD(&isapnp_device_driver.devices);
+
isapnp_for_each_card(card) {
struct list_head *devlist;