linux/arch
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
..
alpha untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
arm ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h> 2010-08-13 13:19:40 -07:00
avr32 untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
blackfin Blackfin: set ARCH_KMALLOC_MINALIGN 2010-07-05 11:10:50 -07:00
cris untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
frv frv: set ARCH_KMALLOC_MINALIGN 2010-07-05 11:10:49 -07:00
h8300 untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
ia64 fix SBA IOMMU to handle allocation failure properly 2010-08-13 13:20:15 -07:00
m32r untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
m68k m68k: set ARCH_KMALLOC_MINALIGN 2010-07-05 11:10:48 -07:00
m68knommu untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
microblaze untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
mips MIPS FPU emulator: allow Cause bits of FCSR to be writeable by ctc1 2010-08-02 10:21:27 -07:00
mn10300 mn10300: set ARCH_KMALLOC_MINALIGN 2010-07-05 11:10:47 -07:00
parisc parisc: pass through '\t' to early (iodc) console 2010-08-10 10:20:38 -07:00
powerpc powerpc/eeh: Fix a bug when pci structure is null 2010-08-13 13:20:17 -07:00
s390 timekeeping: Fix clock_gettime vsyscall time warp 2010-08-13 13:20:13 -07:00
score untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
sh sh: Fix FDPIC binary loader 2010-04-26 07:41:17 -07:00
sparc sparc: Fix use of uid16_t and gid16_t in asm/stat.h 2010-08-02 10:20:44 -07:00
um x86: Fix breakage of UML from the changes in the rwsem system 2010-04-26 07:41:28 -07:00
x86 x86: Fix out of order of gsi 2010-08-13 13:20:16 -07:00
xtensa xtensa: set ARCH_KMALLOC_MINALIGN 2010-07-05 11:10:50 -07:00
.gitignore
Kconfig oprofile: remove tracing build dependency 2010-03-15 08:49:47 -07:00