Re: powerpc/eeh: Fix invalid cached PE primary bus
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-06-23 09:26:27
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-06-23 09:26:27
On Fri, 2016-17-06 at 03:05:11 UTC, Gavin Shan wrote:
The PE primary bus cannot be got from its child devices when having
full hotplug in error recovery. The PE primary bus is cached, which
is done in commit <05ba75f84864> ("powerpc/eeh: Fix stale cached primary
bus"). In eeh_reset_device(), the flag (EEH_PE_PRI_BUS) is cleared
before the PCI hot remove. eeh_pe_bus_get() then returns NULL as the
PE primary bus in pnv_eeh_reset() and it crashes the kernel eventually.
This fixes the issue by clearing the flag (EEH_PE_PRI_BUS) before the
PCI hot add. With it, the PowerNV EEH reset backend (pnv_eeh_reset())
can get valid PE primary bus through eeh_pe_bus_get().
Fixes: 67086e32b564 ("powerpc/eeh: powerpc/eeh: Support error recovery for VF PE")
Reported-by: Pridhiviraj Paidipeddi <redacted>
Signed-off-by: Gavin Shan <redacted>Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/a3aa256b7258b3d19f8b44557c cheers