Skip to contentSkip to conversation

Patch "genirq: Fix cpumask check in __irq_startup_managed()" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 2, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

genirq: Fix cpumask check in __irq_startup_managed()

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
genirq-fix-cpumask-check-in-__irq_startup_managed.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 9cb067ef8a10bb13112e4d1c0ea996ec96527422 Mon Sep 17 00:00:00 2001

From: Thomas Gleixner <[email protected]>
Date: Wed, 13 Sep 2017 23:29:03 +0200
Subject: genirq: Fix cpumask check in __irq_startup_managed()

From: Thomas Gleixner <[email protected]>

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()")
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 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]>
---
 kernel/irq/chip.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/chip.c +1 -1
@@ -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

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/genirq-make-sparse_irq_lock-protect-what-it-should-protect.patch queue-4.13/fs-proc-report-eip-esp-in-prod-pid-stat-for-coredumping.patch queue-4.13/genirq-fix-cpumask-check-in-__irq_startup_managed.patch queue-4.13/genirq-msi-fix-populating-multiple-interrupts.patch