linux/kernel/irq
Thomas Gleixner 927aa9a10f genirq/matrix: Deal with the sillyness of for_each_cpu() on UP
commit 784a083037 upstream.

Most of the CPU mask operations behave the same way, but for_each_cpu() and
it's variants ignore the cpumask argument and claim that CPU0 is always in
the mask. This is historical, inconsistent and annoying behaviour.

The matrix allocator uses for_each_cpu() and can be called on UP with an
empty cpumask. The calling code does not expect that this succeeds but
until commit e027fffff7 ("x86/irq: Unbreak interrupt affinity setting")
this went unnoticed. That commit added a WARN_ON() to catch cases which
move an interrupt from one vector to another on the same CPU. The warning
triggers on UP.

Add a check for the cpumask being empty to prevent this.

Fixes: 2f75d9e1c9 ("genirq: Implement bitmap matrix allocator")
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-03 11:27:06 +02:00
..
Kconfig
Makefile
affinity.c
autoprobe.c
chip.c
cpuhotplug.c
debug.h
debugfs.c genirq/debugfs: Add missing sanity checks to interrupt injection 2020-04-17 10:50:11 +02:00
devres.c
dummychip.c
generic-chip.c
handle.c
internals.h
ipi.c
irq_sim.c
irqdesc.c
irqdomain.c genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy() 2020-04-17 10:50:04 +02:00
manage.c genirq/affinity: Make affinity setting if activated opt-in 2020-08-21 13:05:20 +02:00
matrix.c genirq/matrix: Deal with the sillyness of for_each_cpu() on UP 2020-09-03 11:27:06 +02:00
migration.c
msi.c
pm.c genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq() 2020-08-21 13:05:20 +02:00
proc.c
resend.c
settings.h
spurious.c
timings.c