]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/powernv: Fix stale PE primary bus
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 9 Feb 2016 04:50:22 +0000 (15:50 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Feb 2016 00:57:10 +0000 (11:57 +1100)
commit0fe53e8d335bfc02f81300b70211e61fb931a725
tree2876c4c17bc93cf6adcd607152b1d2e2616c9ab7
parent5b8255dd55f61ff1f65774a2084823415ec09a90
powerpc/powernv: Fix stale PE primary bus

When PCI bus is unplugged during full hotplug for EEH recovery,
the platform PE instance (struct pnv_ioda_pe) isn't released and
it dereferences the stale PCI bus that has been released. It leads
to kernel crash when referring to the stale PCI bus.

This fixes the issue by correcting the PE's primary bus when it's
oneline at plugging time, in pnv_pci_dma_bus_setup() which is to
be called by pcibios_fixup_bus().

Cc: stable@vger.kernel.org # v4.1+
Reported-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/pci.h