From: Wentao Liang <vulab@iscas.ac.cn>
To: Julia.Lawall@lip6.fr
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
robh@kernel.org, saravanak@kernel.org,
Wentao Liang <vulab@iscas.ac.cn>,
stable@vger.kernel.org
Subject: [PATCH] of/irq: Fix remaining refcount leaks in of_irq_init()
Date: Thu, 17 Sep 2026 12:42:47 +0000 [thread overview]
Message-ID: <20260917124247.2151674-1-vulab@iscas.ac.cn> (raw)
Successfully initialized controllers are moved to intc_parent_list,
but the final cleanup only frees the descriptors. The device node
references taken with of_node_get() and the interrupt parent
references are therefore leaked on the normal return path. Drop both
before kfree(), as the intc_desc_list cleanup already does.
Fixes: 8363ccb917c6 ("of/irq: add missing of_node_put")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/of/irq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6367c67732d2..f50fec3afa2e 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -752,6 +752,8 @@ void __init of_irq_init(const struct of_device_id *matches)
list_for_each_entry_safe(desc, temp_desc, &intc_parent_list, list) {
list_del(&desc->list);
+ of_node_put(desc->interrupt_parent);
+ of_node_put(desc->dev);
kfree(desc);
}
err:
--
2.34.1
next reply other threads:[~2026-09-17 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 12:42 Wentao Liang [this message]
2026-09-30 21:09 ` [PATCH] of/irq: Fix remaining refcount leaks in of_irq_init() Rob Herring (Arm)
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=20260917124247.2151674-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=Julia.Lawall@lip6.fr \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
--cc=stable@vger.kernel.org \
/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