[PATCH] NULL dn->type deref in EEH code (IPR driver)

linas at austin.ibm.com linas at austin.ibm.com
Tue Apr 13 03:18:05 EST 2004


Anton,

Can you apply the attached patch to ameslab?

The IPR driver appearently has NULL for struct device_node *dn->type
where dn was returned by pci_device_to_OF_node(dev);  I don't know
if its 'normal' to have a NULL here or not.  Brian King reported
a crash here in his IPR driver, and this patch works around that.

--linas
-------------- 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