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>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 17 Jun 2023 07:02:46 -0000
From:   "irqchip-bot for John Paul Adrian Glaubitz" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
        Rob Landley <rob@...dley.net>, Marc Zyngier <maz@...nel.org>,
        tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/jcore-aic: Fix missing allocation
 of IRQ descriptors

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     4848229494a323eeaab62eee5574ef9f7de80374
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4848229494a323eeaab62eee5574ef9f7de80374
Author:        John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
AuthorDate:    Wed, 10 May 2023 18:33:42 +02:00
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Sat, 17 Jun 2023 07:54:48 +01:00

irqchip/jcore-aic: Fix missing allocation of IRQ descriptors

The initialization function for the J-Core AIC aic_irq_of_init() is
currently missing the call to irq_alloc_descs() which allocates and
initializes all the IRQ descriptors. Add missing function call and
return the error code from irq_alloc_descs() in case the allocation
fails.

Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver")
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
Tested-by: Rob Landley <rob@...dley.net>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20230510163343.43090-1-glaubitz@physik.fu-berlin.de
---
 drivers/irqchip/irq-jcore-aic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/irqchip/irq-jcore-aic.c b/drivers/irqchip/irq-jcore-aic.c
index 5f47d8e..b9dcc8e 100644
--- a/drivers/irqchip/irq-jcore-aic.c
+++ b/drivers/irqchip/irq-jcore-aic.c
@@ -68,6 +68,7 @@ static int __init aic_irq_of_init(struct device_node *node,
 	unsigned min_irq = JCORE_AIC2_MIN_HWIRQ;
 	unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1;
 	struct irq_domain *domain;
+	int ret;
 
 	pr_info("Initializing J-Core AIC\n");
 
@@ -100,6 +101,12 @@ static int __init aic_irq_of_init(struct device_node *node,
 	jcore_aic.irq_unmask = noop;
 	jcore_aic.name = "AIC";
 
+	ret = irq_alloc_descs(-1, min_irq, dom_sz - min_irq,
+			      of_node_to_nid(node));
+
+	if (ret < 0)
+		return ret;
+
 	domain = irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, min_irq,
 				       &jcore_aic_irqdomain_ops,
 				       &jcore_aic);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ