Thread (8 messages) 8 messages, 4 authors, 2024-06-27

Re: [PATCH 1/2] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv

From: Shawn Anastasio <hidden>
Date: 2024-06-27 17:12:56
Also in: linux-pci, lkml

Hi Krishna,

On 5/9/24 7:05 AM, Krishna Kumar wrote:
Description of the problem: The hotplug driver for powerpc
(pci/hotplug/pnv_php.c) gives kernel crash when we try to
hot-unplug/disable the PCIe switch/bridge from the PHB.


Root Cause of Crash: The crash is due to the reason that, though the msi
data structure has been released during disable/hot-unplug path and it
has been assigned with NULL, still during unregistartion the code was
again trying to explicitly disable the msi which causes the Null pointer
dereference and kernel crash.


Proposed Fix : The fix is to correct the check during unregistration path
so that the code should not  try to invoke pci_disable_msi/msix() if its
data structure is already freed.


Signed-off-by: Krishna Kumar <redacted>
I've tested this on a POWER9 box and can confirm that it fixes the panics
when hotplugging PCIe bridges.

Tested-by: Shawn Anastasio <redacted>

Thanks,
Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help