linux-uconsole/arch/powerpc/platforms
Breno Leitao 876c10addb powerpc/eeh: Fix a bug when pci structure is null
commit 8d3d50bf19 upstream.

During a EEH recover, the pci_dev structure can be null, mainly if an
eeh event is detected during cpi config operation. In this case, the
pci_dev will not be known (and will be null) the kernel will crash
with the following message:

Unable to handle kernel paging request for data at address 0x000000a0
Faulting instruction address: 0xc00000000006b8b4
Oops: Kernel access of bad area, sig: 11 [#1]

NIP [c00000000006b8b4] .eeh_event_handler+0x10c/0x1a0
LR [c00000000006b8a8] .eeh_event_handler+0x100/0x1a0
Call Trace:
[c0000003a80dff00] [c00000000006b8a8] .eeh_event_handler+0x100/0x1a0
[c0000003a80dff90] [c000000000031f1c] .kernel_thread+0x54/0x70

The bug occurs because pci_name() tries to access a null pointer.
This patch just guarantee that pci_name() is not called on Null pointers.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Linas Vepstas <linasvepstas@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13 13:20:17 -07:00
..
8xx powerpc/cpm: Remove some cruft code and defines 2009-05-19 00:47:19 -05:00
40x powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC 2009-08-31 09:15:51 -04:00
44x powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support. 2009-08-31 08:24:15 -04:00
52xx mpc5200: support for the MAN mpc5200 based board mucmc52 2009-10-15 09:33:24 -06:00
82xx powerpc/82xx: kmalloc failure ignored in ep8248e_mdio_probe() 2009-11-05 07:18:00 -06:00
83xx powerpc/83xx: Add eSDHC support for MPC837xE-RDB/WLAN boards 2009-08-20 10:27:51 +10:00
85xx powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops 2009-09-11 11:27:57 +10:00
86xx powerpc: Remove swiotlb_pci_dma_ops 2009-08-28 14:24:09 +10:00
512x powerpc/5121: make clock debug output more readable 2009-06-17 01:24:10 -06:00
amigaone powerpc/amigaone: Convert amigaone_init() to a machine_device_initcall() 2009-08-20 10:12:21 +10:00
cell powerpc: Fix memory leak in axon_msi.c 2009-10-14 16:58:36 +11:00
chrp powerpc: Use one common impl. of RTAS timebase sync and use raw spinlock 2009-06-26 16:55:25 +10:00
embedded6xx Merge commit 'origin/master' into next 2009-03-24 13:38:30 +11:00
iseries powerpc/iseries: Remove compiler version dependent hack 2009-10-27 16:42:39 +11:00
maple edac: cpc925 MC platform device setup 2009-06-18 13:03:57 -07:00
pasemi powerpc: Change archdata dma_data to a union 2009-09-24 15:31:43 +10:00
powermac powerpc/pmac: Fix issues with sleep on some powerbooks 2009-10-14 16:58:35 +11:00
prep powerpc/kconfig: Kill PPC_MULTIPLATFORM 2009-03-11 17:11:35 +11:00
ps3 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
pseries powerpc/eeh: Fix a bug when pci structure is null 2010-08-13 13:20:17 -07:00
fsl_uli1575.c powerpc/85xx: Add P2020DS board support 2009-05-19 00:50:43 -05:00
Kconfig powerpc/virtex: Add support for Xilinx PCI host bridge 2009-06-06 10:14:22 -06:00
Kconfig.cputype perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
Makefile powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00