[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171003114242.177185111@linuxfoundation.org>
Date: Tue, 3 Oct 2017 14:28:41 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Tony Luck <tony.luck@...el.com>, Chen Yu <yu.c.chen@...el.com>,
Marc Zyngier <marc.zyngier@....com>,
Alok Kataria <akataria@...are.com>,
Joerg Roedel <joro@...tes.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Steven Rostedt <rostedt@...dmis.org>,
Christoph Hellwig <hch@....de>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>,
Paolo Bonzini <pbonzini@...hat.com>,
Rui Zhang <rui.zhang@...el.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Dan Williams <dan.j.williams@...el.com>,
Len Brown <lenb@...nel.org>
Subject: [PATCH 4.13 019/110] genirq: Fix cpumask check in __irq_startup_managed()
4.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <tglx@...utronix.de>
commit 9cb067ef8a10bb13112e4d1c0ea996ec96527422 upstream.
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: 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
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/irq/chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -202,7 +202,7 @@ __irq_startup_managed(struct irq_desc *d
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