summaryrefslogtreecommitdiffstats
path: root/drivers/mcb
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-09-03 20:15:52 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-07 18:59:17 +0200
commite5169c0043af24e9f8ded2bf666408bb4ea5f5f9 (patch)
tree5ac87e18348a3400bddc494f28d47913f461ee73 /drivers/mcb
parentc25829e2e7de8c7c2ef9dbc95376d38e93674476 (diff)
downloadlinux-stable-e5169c0043af24e9f8ded2bf666408bb4ea5f5f9.tar.gz
linux-stable-e5169c0043af24e9f8ded2bf666408bb4ea5f5f9.tar.bz2
linux-stable-e5169c0043af24e9f8ded2bf666408bb4ea5f5f9.zip
powerpc/eeh: Clean up EEH PEs after recovery finishes
[ Upstream commit 799abe283e5103d48e079149579b4f167c95ea0e ] When the last device in an eeh_pe is removed the eeh_pe structure itself (and any empty parents) are freed since they are no longer needed. This results in a crash when a hotplug driver is involved since the following may occur: 1. Device is suprise removed. 2. Driver performs an MMIO, which fails and queues and eeh_event. 3. Hotplug driver receives a hotplug interrupt and removes any pci_devs that were under the slot. 4. pci_dev is torn down and the eeh_pe is freed. 5. The EEH event handler thread processes the eeh_event and crashes since the eeh_pe pointer in the eeh_event structure is no longer valid. Crashing is generally considered poor form. Instead of doing that use the fact PEs are marked as EEH_PE_INVALID to keep them around until the end of the recovery cycle, at which point we can safely prune any empty PEs. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190903101605.2890-2-oohall@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mcb')
0 files changed, 0 insertions, 0 deletions