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  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]
Date:   Sat, 16 Sep 2017 11:24:57 -0700
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tony.luck@...el.com, bp@...en8.de, lenb@...nel.org,
        marc.zyngier@....com, joro@...tes.org, rostedt@...dmis.org,
        yu.c.chen@...el.com, jgross@...e.com, kys@...rosoft.com,
        peterz@...radead.org, mingo@...nel.org, hch@....de,
        boris.ostrovsky@...cle.com, pbonzini@...hat.com,
        linux-kernel@...r.kernel.org, dan.j.williams@...el.com,
        rjw@...ysocki.net, akataria@...are.com, hpa@...or.com,
        rui.zhang@...el.com, arjan@...ux.intel.com, tglx@...utronix.de
Subject: [tip:irq/urgent] genirq: Fix cpumask check in
 __irq_startup_managed()

Commit-ID:  9cb067ef8a10bb13112e4d1c0ea996ec96527422
Gitweb:     http://git.kernel.org/tip/9cb067ef8a10bb13112e4d1c0ea996ec96527422
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 13 Sep 2017 23:29:03 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 16 Sep 2017 20:20:56 +0200

genirq: Fix cpumask check in __irq_startup_managed()

The result of cpumask_any_and() is invalid when result greater or equal
nr_cpu_ids. The current check is checking for greater only. Fix it.

Fixes: 761ea388e8c4 ("genirq: Handle managed irqs gracefully in irq_startup()")
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Chen Yu <yu.c.chen@...el.com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Alok Kataria <akataria@...are.com>
Cc: Joerg Roedel <joro@...tes.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Christoph Hellwig <hch@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: stable@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Rui Zhang <rui.zhang@...el.com>
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Len Brown <lenb@...nel.org>
Link: http://lkml.kernel.org/r/20170913213152.272283444@linutronix.de

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

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index f51b7b6..6fc89fd 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -202,7 +202,7 @@ __irq_startup_managed(struct irq_desc *desc, struct cpumask *aff, bool force)
 
 	irqd_clr_managed_shutdown(d);
 
-	if (cpumask_any_and(aff, cpu_online_mask) > nr_cpu_ids) {
+	if (cpumask_any_and(aff, cpu_online_mask) >= nr_cpu_ids) {
 		/*
 		 * Catch code which fiddles with enable_irq() on a managed
 		 * and potentially shutdown IRQ. Chained interrupt

Powered by blists - more mailing lists