LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Extra sanity check in EEH code
@ 2006-06-20  8:01 Anton Blanchard
  2006-06-23 15:13 ` Linas Vepstas
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2006-06-20  8:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


From: Nathan Lynch <ntl@pobox.com>

Don't dereference a device node that isn't there.  A "shouldn't
happen" case, but someone ran into it with a possibly misconfigured
device tree.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: build/arch/powerpc/platforms/pseries/eeh_cache.c
===================================================================
--- build.orig/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-08 10:57:36.000000000 +1000
+++ build/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-20 12:01:49.000000000 +1000
@@ -304,6 +304,8 @@ void __init pci_addr_cache_build(void)
 		pci_addr_cache_insert_device(dev);
 
 		dn = pci_device_to_OF_node(dev);
+		if (!dn)
+			continue;
 		pci_dev_get (dev);  /* matching put is in eeh_remove_device() */
 		PCI_DN(dn)->pcidev = dev;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-23 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20  8:01 [PATCH] powerpc: Extra sanity check in EEH code Anton Blanchard
2006-06-23 15:13 ` Linas Vepstas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox