mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>, tglx@kernel.org
Cc: radu@rendec.net, maz@kernel.org, Zubair.Kakakhel@imgtec.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] irqchip/xilinx: Fix potential stale domain on initialization failure
Date: Tue, 1 Dec 2026 14:29:26 +0100	[thread overview]
Message-ID: <dd84e55c-72ae-4d52-b12f-8e6843898a80@amd.com> (raw)
In-Reply-To: <20261201-52610d65e6-irqchip-xilinx@mail.sdu.edu.cn>



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

      reply	other threads:[~2026-12-01 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 12:30 Guangshuo Li
2026-12-01 13:29 ` Michal Simek [this message]

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=dd84e55c-72ae-4d52-b12f-8e6843898a80@amd.com \
    --to=michal.simek@amd.com \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=liguangshuo@mail.sdu.edu.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --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®