LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aditya Gupta <adityag@linux.ibm.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Timothy Pearson <tpearson@raptorengineering.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Shawn Anastasio <sanastasio@raptorengineering.com>,
	sashiko-bot@kernel.org, linux-pci@vger.kernel.org,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/3] ppc/pnv: Add null checks for OpenCapi PHBs
Date: Tue, 9 Jun 2026 14:21:59 +0530	[thread overview]
Message-ID: <f6766e0b-2c69-42cd-b628-76eb3a770852@linux.ibm.com> (raw)
In-Reply-To: <20260608153948.GA36499@bhelgaas>

On 08/06/26 21:09, Bjorn Helgaas wrote:

> On Wed, May 27, 2026 at 11:38:14PM +0530, Aditya Gupta wrote:
>> For opencapi phb direct slots, the .pdev for php_slots will be NULL
>>
>> Various sections of the code in pnv_php can do a null dereference and
>> crash the kernel.
>>
>> Originally, the issue was hit during boot:
>>
>>      [    1.568588] PowerPC PowerNV PCI Hotplug Driver version: 0.1
>>      [    1.569722] BUG: Kernel NULL pointer dereference at 0x00000074
>>      [    1.569811] Faulting instruction address: 0xc000000000b75fd0
>>      [    1.569890] Oops: Kernel access of bad area, sig: 11 [#1]
>>      [    1.569963] LE PAGE_SIZE=64K MMU=Hash  SMP NR_CPUS=2048 NUMA PowerNV
>>      ...
>>      [    1.571492] NIP [c000000000b75fd0] pnv_php_get_adapter_state+0x60/0x154
>>      [    1.571604] LR [c000000000b75fbc] pnv_php_get_adapter_state+0x4c/0x154
>>      [    1.571690] Call Trace:
>>      [    1.571725] [c000c0000688f990] [c000000000b75fbc] pnv_php_get_adapter_state+0x4c/0x154 (unreliable)
>>      [    1.571783] [c000c0000688fa20] [c000000000b78bd0] pnv_php_enable+0x94/0x378
>>      [    1.571951] [c000c0000688fac0] [c000000000b7912c] pnv_php_register_one.isra.0+0x11c/0x1e0
> Drop timestamps since they don't add useful information.
>
> Indent quoted material by two spaces to reduce wrapping.
>
> Run "git log --oneline drivers/pci/hotplug/pnv_php.c" and "git log
> --oneline drivers/pci/hotplug/" and match subject line style.
>
>> This occurs for hotplug slots on root buses where bus->self == NULL,
>> such as OpenCAPI PHB direct slots. An added debug print (not part of
>> this patch) confirmed it was opencapi:
> Style "OpenCAPI" and "PHB" consistently in commit log and subject.

Thanks for the review Bjorn, fixed the description and have sent the 
patch again as v3.

In v3, I have sent the patch #1 independently for rc, and will send the 
rework patches (patches #2 and #3) separately, since I have to do extra 
fixes for pre-existing issues pointed by sashiko.

Thanks,
- Aditya G




  reply	other threads:[~2026-06-09  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 18:08 [PATCH v2 0/3] ppc/pnv: Fix panics and refactor pnv_php.c Aditya Gupta
2026-05-27 18:08 ` [PATCH v2 1/3] ppc/pnv: Add null checks for OpenCapi PHBs Aditya Gupta
2026-06-08 15:39   ` Bjorn Helgaas
2026-06-09  8:51     ` Aditya Gupta [this message]
2026-05-27 18:08 ` [PATCH v2 2/3] ppc/pnv: Refactor PNV PCI hotplug driver Aditya Gupta
2026-05-27 18:08 ` [PATCH v2 3/3] ppc/pnv: Refactor PNV PCI Hotplug to group PCIe functions Aditya Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6766e0b-2c69-42cd-b628-76eb3a770852@linux.ibm.com \
    --to=adityag@linux.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=chleroy@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sashiko-bot@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tpearson@raptorengineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox