From: Venkat <venkat88@linux.ibm.com>
To: Nam Cao <namcao@linutronix.de>, Nilay Shroff <nilay@linux.ibm.com>
Cc: Nilay Shroff <nilay@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com,
mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, tglx@linutronix.de, maz@kernel.org,
ritesh.list@gmail.com, gautam@linux.ibm.com,
stable@vger.kernel.org
Subject: Re: [PATCH] powerpc/xive: fix kmemleak caused by incorrect chip_data lookup
Date: Fri, 13 Mar 2026 12:53:22 +0530 [thread overview]
Message-ID: <F3269117-075D-481E-AFD2-D4AE703C8EF2@linux.ibm.com> (raw)
In-Reply-To: <878qbw5lfb.fsf@yellow.woof>
> On 13 Mar 2026, at 11:18 AM, Nam Cao <namcao@linutronix.de> wrote:
>
> Nilay Shroff <nilay@linux.ibm.com> writes:
>> The kmemleak reports the following memory leak:
> ...
>> Fix this by retrieving the irq_data from the correct domain using
>> irq_domain_get_irq_data() and then accessing the chip_data via
>> irq_data_get_irq_chip_data().
>>
>> Cc: stable@vger.kernel.org
>> Fixes: cc0cc23babc9 ("powerpc/xive: Untangle xive from child interrupt controller drivers")
>> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Hi,
I have tested this patch, and it fixes the reported kmemleak issue.
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Below is the kmemleak output without this patch applied:
cat /sys/kernel/debug/kmemleak
unreferenced object 0xc00000000606fc80 (size 64):
comm "kworker/0:1", pid 11, jiffies 4294937450
hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 00 00 ab 0d 00 04 00 00 ................
00 00 a1 80 00 00 0a c0 00 00 aa 0d 00 04 00 00 ................
backtrace (crc 642b8a1d):
__kmalloc_cache_noprof+0x350/0x7a4
xive_irq_alloc_data.constprop.0+0x40/0xe0
xive_irq_domain_alloc+0xd4/0x1ac
irq_domain_alloc_irqs_parent+0x44/0x6c
pseries_irq_domain_alloc+0x1c4/0x34c
irq_domain_alloc_irqs_parent+0x44/0x6c
msi_domain_alloc+0xb0/0x214
irq_domain_alloc_irqs_locked+0x138/0x4d0
__irq_domain_alloc_irqs+0x8c/0xfc
__msi_domain_alloc_irqs+0x214/0x4c8
msi_domain_alloc_irqs_all_locked+0x70/0xf8
pci_msi_setup_msi_irqs+0x60/0x78
msix_setup_interrupts+0x17c/0x318
__pci_enable_msix_range+0x41c/0x770
pci_alloc_irq_vectors_affinity+0x170/0x1d8
nvme_pci_enable+0xa0/0x3b0 [nvme]
unreferenced object 0xc00000000606f900 (size 64):
comm "kworker/0:1", pid 11, jiffies 4294937451
With the patch applied, no kmemleak reports are observed after repeated MSI‑X enable/disable cycles on the NVMe controller.
Regards,
Venkat
> Reviewed-by: Nam Cao <namcao@linutronix.de>
>
next prev parent reply other threads:[~2026-03-13 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 13:43 [PATCH] powerpc/xive: fix kmemleak caused by incorrect chip_data lookup Nilay Shroff
2026-03-13 5:48 ` Nam Cao
2026-03-13 7:23 ` Venkat [this message]
2026-04-08 4:28 ` Madhavan Srinivasan
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=F3269117-075D-481E-AFD2-D4AE703C8EF2@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=gautam@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=maz@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=namcao@linutronix.de \
--cc=nilay@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.