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] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-28b6afa7d4456e759031bf83706b4be3689fba94@git.kernel.org>
Date:   Fri, 9 Mar 2018 02:49:19 -0800
From:   tip-bot for Bartosz Golaszewski <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, marc.zyngier@....com,
        linux-kernel@...r.kernel.org, mingo@...nel.org, hpa@...or.com,
        brgl@...ev.pl
Subject: [tip:irq/core] genirq/irq_sim: Check the return value of
 irq_sim_init() for error codes

Commit-ID:  28b6afa7d4456e759031bf83706b4be3689fba94
Gitweb:     https://git.kernel.org/tip/28b6afa7d4456e759031bf83706b4be3689fba94
Author:     Bartosz Golaszewski <brgl@...ev.pl>
AuthorDate: Sun, 4 Mar 2018 13:10:17 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 9 Mar 2018 11:44:03 +0100

genirq/irq_sim: Check the return value of irq_sim_init() for error codes

As discussed with Marc Zyngier: irq_sim_init() and its devres variant
should return the base of the allocated interrupt range on success rather
than 0.

Make devm_irq_sim_init() check for an error code. This is a preparatory
change for modifying irq_sim_init() itself.

Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Marc Zyngier <marc.zyngier@....com>
Link: https://lkml.kernel.org/r/20180304121018.640-3-brgl@bgdev.pl

---
 kernel/irq/irq_sim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c
index bd7dc1db6a80..05f0d7c1698a 100644
--- a/kernel/irq/irq_sim.c
+++ b/kernel/irq/irq_sim.c
@@ -124,7 +124,7 @@ int devm_irq_sim_init(struct device *dev, struct irq_sim *sim,
 		return -ENOMEM;
 
 	rv = irq_sim_init(sim, num_irqs);
-	if (rv) {
+	if (rv < 0) {
 		devres_free(dr);
 		return rv;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ