linux_dsm_epyc7002/arch/powerpc
Thadeu Lima de Souza Cascardo 6a040ce725 powerpc/eeh: Fix crash when adding a device in a slot with DDW
The DDW code uses a eeh_dev struct from the pci_dev. However, this is
not set until eeh_add_device_late is called.

Since pci_bus_add_devices is called before eeh_add_device_late, the PCI
devices are added to the bus, making drivers' probe hooks to be called.
These will call set_dma_mask, which will call the DDW code, which will
require the eeh_dev struct from pci_dev. This would result in a crash,
due to a NULL dereference.

Calling eeh_add_device_late after pci_bus_add_devices would make the
system BUG, because device files shouldn't be added to devices there
were not added to the system. So, a new function is needed to add such
files only after pci_bus_add_devices have been called.

Cc: stable@vger.kernel.org
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Acked-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-01-10 17:01:58 +11:00
..
boot powerpc/dts/virtex440: Add ethernet phy to virtex440-ml507 board 2013-01-10 15:09:05 +11:00
configs powerpc: Enable devtmpfs, EFI partition support and tmpfs ACLs on pseries, ppc64 and ppc64e defconfig 2013-01-10 17:01:25 +11:00
crypto powerpc: Add a powerpc implementation of SHA-1 2013-01-10 14:43:45 +11:00
include powerpc/eeh: Fix crash when adding a device in a slot with DDW 2013-01-10 17:01:58 +11:00
kernel powerpc/eeh: Fix crash when adding a device in a slot with DDW 2013-01-10 17:01:58 +11:00
kvm powerpc: Disable relocation on exceptions whenever PR KVM is active 2013-01-10 17:00:42 +11:00
lib powerpc: Build kernel with -mcmodel=medium 2013-01-10 17:00:31 +11:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers 2013-01-10 17:01:44 +11:00
net PPC: net: bpf_jit_comp: add VLAN instructions for BPF JIT 2012-11-17 22:12:47 -05:00
oprofile powerpc: Build kernel with -mcmodel=medium 2013-01-10 17:00:31 +11:00
perf powerpc/perf: Add stalled-cycles events 2013-01-10 17:00:56 +11:00
platforms powerpc/eeh: Fix crash when adding a device in a slot with DDW 2013-01-10 17:01:58 +11:00
sysdev powerpc: Build kernel with -mcmodel=medium 2013-01-10 17:00:31 +11:00
xmon powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers 2013-01-10 17:01:44 +11:00
Kconfig powerpc: Enable ARCH_USE_BUILTIN_BSWAP 2013-01-10 17:00:54 +11:00
Kconfig.debug powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
Makefile powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit 2013-01-10 17:01:27 +11:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00