Skip to content

Commit 9cb067e

Browse files
committed
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: 761ea38 ("genirq: Handle managed irqs gracefully in irq_startup()") Signed-off-by: Thomas Gleixner <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Tony Luck <[email protected]> Cc: Chen Yu <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Alok Kataria <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: [email protected] Cc: Paolo Bonzini <[email protected]> Cc: Rui Zhang <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Dan Williams <[email protected]> Cc: Len Brown <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
1 parent 7318413 commit 9cb067e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/irq/chip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ __irq_startup_managed(struct irq_desc *desc, struct cpumask *aff, bool force)
202202

203203
irqd_clr_managed_shutdown(d);
204204

205-
if (cpumask_any_and(aff, cpu_online_mask) > nr_cpu_ids) {
205+
if (cpumask_any_and(aff, cpu_online_mask) >= nr_cpu_ids) {
206206
/*
207207
* Catch code which fiddles with enable_irq() on a managed
208208
* and potentially shutdown IRQ. Chained interrupt

0 commit comments

Comments
 (0)