From nobody Sat Jul 25 18:07:46 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D0E73B9DA1; Wed, 15 Jul 2026 07:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784099724; cv=none; b=QME2OZ2JyfR89plvmWaiQUf3nTUS84XfTDZXGrGHu6TXDiuswAkXwwESqmR9fsQ5SqsQNXdF4Toa097cdHH4i0wkwv0l4ME7h4PPLWO9PfIQDSwu++Yf4bqLoLO++oDdU8p8e3aUBPepFYCdwzE4Lpck50sEQQfVcujg7ONuprA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784099724; c=relaxed/simple; bh=JOD9MJPa8I9BlTEYl0FzMed9DPtrEtI2jSBR5U8mbLc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=bjtoYSIbS8I7EziWTKJg6v/tHqcdyxh6kLH9vs4/3Y344luAqDkFmGtYpLopIDlvPdFyvTfllAErfkFZs/jTuXRVIruFRpfrgSqTfxHhIQrYgrxrxIooKpSvoA6RFReCMEN90FzD2HcVnthGhOU+CVbAXS2P3OTu9dr7D+/NsVE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hkubGXKY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YgJ0PlfT; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hkubGXKY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YgJ0PlfT" Date: Wed, 15 Jul 2026 07:15:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784099721; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3LttsjI1s+ki6u3GHabPMoi/wiFinYfddXOegz5yc+4=; b=hkubGXKY83JTYNy/gWnaA592B4JJC7PXJGc8in1J8zswuOWwGg/gyO1n4w/hzWqxcB88cb tC+ji8kzj/qODJ25zBOV7MKudjZOVQRBgVLlQLszjWUddB2JQmC6IcLxfDDsoRmp3VKyHQ UHy/uglF2FY3ptYbxLJVv3Gbxx/s0YCwnuTYYPwQLqhig92DLNjC4e1GfEKQFb+IIPOF+M Agi1nc+wSRUg7oPKW33mqruLKWltWLIb9dKxFOwxm1ou855GcBSq/UpTXEQMMLnw9L2bXP getJRaIIxjbjvlq09WtRPqHnYKIGI7s1HOiyF8w3DUviA0pDRgo4b7CX9RlkvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784099721; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3LttsjI1s+ki6u3GHabPMoi/wiFinYfddXOegz5yc+4=; b=YgJ0PlfTzXcjBtdnrZENA+I6AQ/wmlfDi4ABXyFDJORJJAwCICDYLu8N1qe8HrLsa5rb1P pPFfaRCxK0qvrGCw== From: "tip-bot2 for Qingshuang Fu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/drivers] irqchip/renesas-irqc: Fix generic interrupt chip leak on remove Cc: Qingshuang Fu , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260708100846.506314-1-fffsqian@163.com> References: <20260708100846.506314-1-fffsqian@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178409971918.1844600.3753789263175933564.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/drivers branch of tip: Commit-ID: 616dd89d81ad9a3cf1cfff4088a4c43e4e00d6ba Gitweb: https://git.kernel.org/tip/616dd89d81ad9a3cf1cfff4088a4c43e4= e00d6ba Author: Qingshuang Fu AuthorDate: Wed, 08 Jul 2026 18:08:46 +08:00 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner 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-renes= as-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; } =20 + p->irq_domain->flags |=3D IRQ_DOMAIN_FLAG_DESTROY_GC; ret =3D irq_alloc_domain_generic_chips(p->irq_domain, p->number_of_irqs, 1, "irqc", handle_level_irq, 0, 0, IRQ_GC_INIT_NESTED_LOCK);