From: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
To: tglx@kernel.org, michal.simek@amd.com
Cc: radu@rendec.net, maz@kernel.org, Zubair.Kakakhel@imgtec.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure
Date: Tue, 1 Dec 2026 20:30:48 +0800 [thread overview]
Message-ID: <20261201-52610d65e6-irqchip-xilinx@mail.sdu.edu.cn> (raw)
If mapping the parent interrupt fails, initialization frees the
controller but leaves its IRQ domain registered with the freed
controller as host data.
Remove the unused domain before releasing the controller.
This issue was found by our static analysis tool under development.
Fixes: 9689c99e4950 ("irqchip/xilinx: Add support for parent intc")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
drivers/irqchip/irq-xilinx-intc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c
index bba6f6dc405e..6f37383122c4 100644
--- a/drivers/irqchip/irq-xilinx-intc.c
+++ b/drivers/irqchip/irq-xilinx-intc.c
@@ -229,7 +229,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
} else {
pr_err("irq-xilinx: interrupts property not in DT\n");
ret = -EINVAL;
- goto error;
+ goto remove_domain;
}
} else {
primary_intc = irqc;
@@ -239,6 +239,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
return 0;
+remove_domain:
+ irq_domain_remove(irqc->root_domain);
error:
iounmap(irqc->base);
kfree(irqc);
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
next reply other threads:[~2026-12-01 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 12:30 Guangshuo Li [this message]
2026-12-01 13:29 ` Michal Simek
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=20261201-52610d65e6-irqchip-xilinx@mail.sdu.edu.cn \
--to=liguangshuo@mail.sdu.edu.cn \
--cc=Zubair.Kakakhel@imgtec.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=michal.simek@amd.com \
--cc=radu@rendec.net \
--cc=tglx@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
all inboxes | Powered by JetHome®