Thread (10 messages) 10 messages, 4 authors, 2024-06-29

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-06-28 04:48:07
Also in: linux-pci, lkml

Shawn Anastasio [off-list ref] writes:
Hi Krishna,

On 6/24/24 7:09 AM, Krishna Kumar wrote:
quoted
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.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <redacted>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Gaurav Batra <redacted>
Cc: Nathan Lynch <redacted>
Cc: Brian King <redacted>

Signed-off-by: Krishna Kumar <redacted>
As with v1, I can confirm that this patch solves the panic encountered
when hotplugging PCIe bridges on POWER9.
Was the panic reported anywhere? So we can link to the report in the
commit.

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