* [patch 01/52] genirq: Fix cpumask check in __irq_startup_managed()
[not found] <20170913212902.530704676@linutronix.de>
@ 2017-09-13 21:29 ` Thomas Gleixner
0 siblings, 0 replies; only message in thread
From: Thomas Gleixner @ 2017-09-13 21:29 UTC (permalink / raw)
To: LKML
Cc: Ingo Molnar, Peter Anvin, Marc Zyngier, Peter Zijlstra,
Borislav Petkov, Chen Yu, Rui Zhang, Rafael J. Wysocki,
Len Brown, Dan Williams, Christoph Hellwig, Paolo Bonzini,
Joerg Roedel, Boris Ostrovsky, Juergen Gross, Tony Luck,
K. Y. Srinivasan, Alok Kataria, Steven Rostedt, Arjan van de Ven,
stable
[-- Attachment #1: genirq--Fix-cpumask-check.patch --]
[-- Type: text/plain, Size: 739 bytes --]
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@linutronix.de>
Cc: stable@vger.kernel.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 @@ static int
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
^ permalink raw reply [flat|nested] only message in thread