]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: extract host bridge from pci_bus prior to bus removal
authorTyrel Datwyler <tyreld@linux.ibm.com>
Thu, 11 Feb 2021 18:24:35 +0000 (12:24 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 16 Apr 2021 13:58:04 +0000 (23:58 +1000)
commitb8e35f0ac49a4b0613cf6cf02f060e7a0b9117a5
treede15257dffd6ae09528c31f2eff7ff86aad210bf
parentd8470633f4e3a2e10394589ecc6a48b3fdecd386
powerpc/pseries: extract host bridge from pci_bus prior to bus removal

The pci_bus->bridge reference may no longer be valid after
pci_bus_remove() resulting in passing a bad value to device_unregister()
for the associated bridge device.

Store the host_bridge reference in a separate variable prior to
pci_bus_remove().

Fixes: 1a61ce2a3df2 ("powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal")
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210211182435.47968-1-tyreld@linux.ibm.com
arch/powerpc/platforms/pseries/pci_dlpar.c