* [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure
@ 2026-12-01 12:30 Guangshuo Li
2026-12-01 13:29 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-12-01 12:30 UTC (permalink / raw)
To: tglx, michal.simek
Cc: radu, maz, Zubair.Kakakhel, linux-kernel, linux-arm-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure
2026-12-01 12:30 [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure Guangshuo Li
@ 2026-12-01 13:29 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2026-12-01 13:29 UTC (permalink / raw)
To: Guangshuo Li, tglx
Cc: radu, maz, Zubair.Kakakhel, linux-kernel, linux-arm-kernel
On 12/1/26 13:30, Guangshuo Li wrote:
> 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
Yes the issue is there. We also found it some weeks ago but didn't send it out.
Reviewed-by: Michal Simek <michal.simek@amd.com>
Thanks,
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-01 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 12:30 [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure Guangshuo Li
2026-12-01 13:29 ` Michal Simek
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®