On Mon, Mar 28, 2005 at 06:45:43PM +0200, Eran Mann wrote:
> The OOPS below gets generated consistently when FC3 kudzu is run during 
> boot (tested between 2.6.11-bk7 and 2.6.11.6-bk1). It seems to be caused 
> by the hotplug-parport changeset:
> http://linux.bkbits.net:8080/linux-2.5/[EMAIL PROTECTED]|[EMAIL PROTECTED]
> (reverting this changeset eliminates the oops).

Please try this instead.

It appears that the parport driver claims on-board superio devices
without actually doing anything.  When the driver is removed, we
try to dereference non-existent driver data to unregister the ports.
Since we didn't register anything, it's safe to ignore these devices
in the remove function.

Signed-off-by: Russell King <[EMAIL PROTECTED]>

diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej 
orig/drivers/parport/parport_pc.c linux/drivers/parport/parport_pc.c
--- orig/drivers/parport/parport_pc.c   Sat Mar 19 11:22:08 2005
+++ linux/drivers/parport/parport_pc.c  Mon Mar 28 17:55:51 2005
@@ -2976,10 +2976,12 @@ static void __devexit parport_pc_pci_rem
 
        pci_set_drvdata(dev, NULL);
 
-       for (i = data->num - 1; i >= 0; i--)
-               parport_pc_unregister_port(data->ports[i]);
+       if (data) {
+               for (i = data->num - 1; i >= 0; i--)
+                       parport_pc_unregister_port(data->ports[i]);
 
-       kfree(data);
+               kfree(data);
+       }
 }
 
 static struct pci_driver parport_pc_pci_driver = {

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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/

Reply via email to