From: "tip-bot2 for Qingshuang Fu" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Qingshuang Fu <fuqingshuang@kylinos.cn>,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/renesas-irqc: Fix generic interrupt chip leak on remove
Date: Wed, 15 Jul 2026 07:15:19 -0000 [thread overview]
Message-ID: <178409971918.1844600.3753789263175933564.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260708100846.506314-1-fffsqian@163.com>
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 616dd89d81ad9a3cf1cfff4088a4c43e4e00d6ba
Gitweb: https://git.kernel.org/tip/616dd89d81ad9a3cf1cfff4088a4c43e4e00d6ba
Author: Qingshuang Fu <fuqingshuang@kylinos.cn>
AuthorDate: Wed, 08 Jul 2026 18:08:46 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 15 Jul 2026 09:10:46 +02:00
irqchip/renesas-irqc: Fix generic interrupt chip leak on remove
The driver allocates domain generic chips probe. However, on driver
removal, the generic chips are not automatically freed when the interrupt
domain is removed because the domain flags do not include
IRQ_DOMAIN_FLAG_DESTROY_GC.
This causes both the domain generic chips structure and the associated
generic chips to be leaked. Additionally, the generic chips remain on the
global list and may later be accessed by generic interrupt chip suspend,
resume, or shutdown callbacks after the driver has been removed,
potentially resulting in a use-after-free and kernel crash.
Fix the resource leak by setting IRQ_DOMAIN_FLAG_DESTROY_GC on the
interrupt domain; this lets the interrupt domain core automatically
release all generic chips when irq_domain_remove() is invoked, removing
the need for manual cleanup calls in error paths and remove callback.
Fixes: 99c221df33fbfa1b ("irqchip/renesas-irqc: Move over to nested generic chip")
Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260708100846.506314-1-fffsqian@163.com
---
drivers/irqchip/irq-renesas-irqc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index a20a647..1ff3535 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -176,6 +176,7 @@ static int irqc_probe(struct platform_device *pdev)
goto err_runtime_pm_disable;
}
+ p->irq_domain->flags |= IRQ_DOMAIN_FLAG_DESTROY_GC;
ret = irq_alloc_domain_generic_chips(p->irq_domain, p->number_of_irqs,
1, "irqc", handle_level_irq,
0, 0, IRQ_GC_INIT_NESTED_LOCK);
next prev parent reply other threads:[~2026-07-15 7:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 6:55 [PATCH 1/1] irqchip/renesas-irqc: fix generic IRQ " fffsqian
2026-06-12 7:44 ` Geert Uytterhoeven
2026-06-12 8:25 ` [PATCH v2 " fffsqian
2026-07-07 6:56 ` Re:Re: [PATCH " Qingshuang Fu
2026-07-07 19:41 ` Thomas Gleixner
2026-07-08 2:09 ` [PATCH v3 RESEND] " Qingshuang Fu
2026-07-08 9:02 ` Thomas Gleixner
2026-07-08 9:38 ` [PATCH v4] irqchip/renesas-irqc: fix generic interrupt " Qingshuang Fu
2026-07-08 9:48 ` Geert Uytterhoeven
2026-07-08 10:08 ` [PATCH v5] " Qingshuang Fu
2026-07-15 7:15 ` tip-bot2 for Qingshuang Fu [this message]
2026-07-08 10:10 ` Re:Re: [PATCH v4] " Qingshuang Fu
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=178409971918.1844600.3753789263175933564.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=fuqingshuang@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@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®