4.13-stable review patch. If anyone has any objections, please let me know.
------------------ From: Thomas Gleixner <t...@linutronix.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 <t...@linutronix.de> Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> Cc: Juergen Gross <jgr...@suse.com> Cc: Tony Luck <tony.l...@intel.com> Cc: Chen Yu <yu.c.c...@intel.com> Cc: Marc Zyngier <marc.zyng...@arm.com> Cc: Alok Kataria <akata...@vmware.com> Cc: Joerg Roedel <j...@8bytes.org> Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> Cc: Steven Rostedt <rost...@goodmis.org> Cc: Christoph Hellwig <h...@lst.de> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Borislav Petkov <b...@alien8.de> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Rui Zhang <rui.zh...@intel.com> Cc: "K. Y. Srinivasan" <k...@microsoft.com> Cc: Arjan van de Ven <ar...@linux.intel.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Len Brown <l...@kernel.org> Link: http://lkml.kernel.org/r/20170913213152.272283...@linutronix.de Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.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