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]
Message-ID: <166946966692.4906.8560659273979544805.tip-bot2@tip-bot2>
Date:   Sat, 26 Nov 2022 13:34:26 -0000
From:   "irqchip-bot for Liu Peibao" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     Liu Peibao <liupeibao@...ngson.cn>, Marc Zyngier <maz@...nel.org>,
        tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/loongson-liointc: Fix improper
 error handling in liointc_init()

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

Commit-ID:     4a60a3cdcf1875c965095eb9e22c3d12bbc5a53d
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4a60a3cdcf1875c965095eb9e22c3d12bbc5a53d
Author:        Liu Peibao <liupeibao@...ngson.cn>
AuthorDate:    Fri, 04 Nov 2022 19:07:12 +08:00
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Sat, 26 Nov 2022 13:29:57 

irqchip/loongson-liointc: Fix improper error handling in liointc_init()

For cores less than 4, eg, loongson2k1000 with 2 cores, the
of_property_match_string() may return with an error value,
which causes that liointc could not work. At least isr0 is
what should be checked like previous commit b2c4c3969fd7
("irqchip/loongson-liointc: irqchip add 2.0 version") did.

Fixes: 0858ed035a85 ("irqchip/loongson-liointc: Add ACPI init support")
Signed-off-by: Liu Peibao <liupeibao@...ngson.cn>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20221104110712.23300-1-liupeibao@loongson.cn
---
 drivers/irqchip/irq-loongson-liointc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
index 0da8716..c4584e2 100644
--- a/drivers/irqchip/irq-loongson-liointc.c
+++ b/drivers/irqchip/irq-loongson-liointc.c
@@ -207,10 +207,13 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
 					"reg-names", core_reg_names[i]);
 
 			if (index < 0)
-				goto out_iounmap;
+				continue;
 
 			priv->core_isr[i] = of_iomap(node, index);
 		}
+
+		if (!priv->core_isr[0])
+			goto out_iounmap;
 	}
 
 	/* Setup IRQ domain */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ