lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251114-rv-intc-fix-v1-1-a3edd1c1a868@sifive.com>
Date: Fri, 14 Nov 2025 15:28:44 +0800
From: Nick Hu <nick.hu@...ive.com>
To: Anup Patel <anup@...infault.org>, Thomas Gleixner <tglx@...utronix.de>, 
 Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>, 
 Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 Nick Hu <nick.hu@...ive.com>
Subject: [PATCH] irqchip/riscv-intc: Fix missing .free callback for freeing
 local IRQs

The irq_domain_free_irqs() helper requires that the irq_domain_ops->free
callback be implemented. Otherwise, the kernel reports the warning
message "NULL pointer, cannot free irq" when the user calls
irq_dispose_mapping() to release the per-HART local IRQs.

Set the irq_domain_ops->free to irq_domain_free_irqs_top() to free the
IRQs.

Signed-off-by: Nick Hu <nick.hu@...ive.com>
---
 drivers/irqchip/irq-riscv-intc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index e5805885394ee3892a9a9784a937e234490ba0ea..70290b35b3173eb1fd5eb448f5432735210b5444 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -166,7 +166,8 @@ static int riscv_intc_domain_alloc(struct irq_domain *domain,
 static const struct irq_domain_ops riscv_intc_domain_ops = {
 	.map	= riscv_intc_domain_map,
 	.xlate	= irq_domain_xlate_onecell,
-	.alloc	= riscv_intc_domain_alloc
+	.alloc	= riscv_intc_domain_alloc,
+	.free	= irq_domain_free_irqs_top,
 };
 
 static struct fwnode_handle *riscv_intc_hwnode(void)

---
base-commit: 6da43bbeb6918164f7287269881a5f861ae09d7e
change-id: 20251114-rv-intc-fix-87f4a81a8133

Best regards,
-- 
Nick Hu <nick.hu@...ive.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ