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:   Mon, 21 Aug 2023 16:58:07 -0000
From:   "irqchip-bot for Bibo Mao" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     Bibo Mao <maobibo@...ngson.cn>, philmd@...aro.org,
        Marc Zyngier <maz@...nel.org>, tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/loongson-eiointc: Fix return
 value checking of eiointc_index

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

Commit-ID:     2e99b73afde18853754c5fae8e8d1a66fe5e3f64
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/2e99b73afde18853754c5fae8e8d1a66fe5e3f64
Author:        Bibo Mao <maobibo@...ngson.cn>
AuthorDate:    Fri, 11 Aug 2023 17:58:04 +08:00
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Mon, 21 Aug 2023 17:39:21 +01:00

irqchip/loongson-eiointc: Fix return value checking of eiointc_index

Return value of function eiointc_index is int, however it is converted
into uint32_t and then compared smaller than zero, this will cause logic
problem.

Fixes: dd281e1a1a93 ("irqchip: Add Loongson Extended I/O interrupt controller support")
Signed-off-by: Bibo Mao <maobibo@...ngson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@...aro.org>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20230811095805.2974722-2-maobibo@loongson.cn
---
 drivers/irqchip/irq-loongson-eiointc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 92d8aa2..1623cd7 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -144,7 +144,7 @@ static int eiointc_router_init(unsigned int cpu)
 	int i, bit;
 	uint32_t data;
 	uint32_t node = cpu_to_eio_node(cpu);
-	uint32_t index = eiointc_index(node);
+	int index = eiointc_index(node);
 
 	if (index < 0) {
 		pr_err("Error: invalid nodemap!\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ