From: jackysliu <1972843537@qq.com>
To: maddy@linux.ibm.com
Cc: mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, 1972843537@qq.com,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] powerpc : fix resource leak in holly_init_IRQ()
Date: Mon, 21 Jul 2025 12:17:32 +0800 [thread overview]
Message-ID: <tencent_E9EF29CDB2286A690EB871B78BFE62491908@qq.com> (raw)
From: Siyang Liu <1972843537@qq.com>
When the 'pic-router' device node lookup fails in holly_init_IRQ(),
the function returns without releasing the previously acquired
'tsi_pci' node. This violates the device tree reference counting
rules and causes a resource leak.
This issue was detected by rule based static tools
developed by Tencent.
Signed-off-by: Siyang Liu <1972843537@qq.com>
---
arch/powerpc/platforms/embedded6xx/holly.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index ce9e58ee9754..fefb7fd2365f 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -178,6 +178,7 @@ static void __init holly_init_IRQ(void)
cascade_node = of_find_node_by_type(NULL, "pic-router");
if (cascade_node == NULL) {
printk(KERN_ERR "%s: No tsi108 pci cascade node found !\n", __func__);
+ of_node_put(tsi_pci);
return;
}
--
2.43.5
reply other threads:[~2025-07-21 4:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_E9EF29CDB2286A690EB871B78BFE62491908@qq.com \
--to=1972843537@qq.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.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
all inboxes | Powered by JetHome®