[PATCH] eeh crash on NULL dn-type

linas at austin.ibm.com linas at austin.ibm.com
Thu May 6 09:30:10 EST 2004


Hi Anton,

Tripped over a "fixed bug".  I'm crashing in eeh.c in
   if (!strcmp(dn->type, "isa"))
because the device node dn->type is NULL.  This kernel
has your earlier patch in it to always set dn->type to
something, for example, to the string "<NULL>".
Unfortunately, it did this only during boot, and not
during hotplug. I get this during testing of PCI hotplug
with traffic on the net.

I think what is happening is that as the card is still
being hotplug-enabled, the network traffic causes ethernet
interrupts to start flowing, one of which provokes an
eeh_check_failure() which does the bad strcmp.  As far
as I can tell, this is a race condition; there's no crash
if the network is quiet during the hotplug add.

I'm not planning on exploring the source of the race
condition unless someone kicks me; I'm happy to patch
the symptom, mostly cause I don't think anyone else
is affected.  :) kick me if you disagree.

Attached is an old patch that was never applied.
Please apply.

--linas

p.s. do the distros require a bugzilla to pick this up?
should I open a bugzilla?
-------------- next part --------------
--- arch/ppc64/kernel/eeh.c.orig	2004-04-12 12:02:49.000000000 -0500
+++ arch/ppc64/kernel/eeh.c	2004-04-12 12:04:11.000000000 -0500
@@ -487,9 +487,9 @@ unsigned long eeh_check_failure(void *to
 	    dn->eeh_mode & EEH_MODE_NOCHECK)
 		goto ok_return;

-        /* Make sure we aren't ISA */
-        if (!strcmp(dn->type, "isa"))
-                goto ok_return;
+	/* Make sure we aren't ISA */
+	if (dn->type && !strcmp(dn->type, "isa"))
+		goto ok_return;

 	if (!dn->eeh_config_addr)
 		goto ok_return;


More information about the Linuxppc64-dev mailing list