[PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure
Michal Simek
michal.simek at amd.com
Tue Dec 1 05:29:26 PST 2026
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 at 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 at amd.com>
Thanks,
Michal
More information about the linux-arm-kernel
mailing list