linux/arch/powerpc
Breno Leitao 8d3d50bf19 powerpc/eeh: Fix a bug when pci structure is null
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>
2010-02-17 14:02:47 +11:00
..
boot zlib: Fix build of powerpc boot wrapper 2010-01-13 16:13:39 -08:00
configs powerpc: Reduce differences between pseries and ppc64 defconfigs 2010-02-09 13:56:06 +11:00
include/asm powerpc/eeh: Fix a bug when pci structure is null 2010-02-17 14:02:47 +11:00
kernel powerpc: Only print clockevent settings once 2010-02-09 13:56:24 +11:00
kvm KVM: powerpc: Show timing option only on embedded 2010-01-25 12:26:36 -02:00
lib locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm Merge commit 'origin/master' into next 2010-02-17 10:00:42 +11:00
oprofile tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
platforms powerpc/eeh: Fix a bug when pci structure is null 2010-02-17 14:02:47 +11:00
sysdev powerpc: Add coherent_dma_mask to mv64x60 devices 2010-02-17 14:02:47 +11:00
xmon powerpc: Mark some variables in the page fault path __read_mostly 2010-02-03 17:39:48 +11:00
Kconfig powerpc: Increase NR_IRQS Kconfig maximum to 32768 2010-02-03 17:39:50 +11:00
Kconfig.debug Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
Makefile powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00