kernel-fxtec-pro1x/kernel/irq
Thomas Gleixner d9eeca1ed8 genirq/matrix: Deal with the sillyness of for_each_cpu() on UP
commit 784a0830377d0761834e385975bc46861fea9fa0 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 e027fffff799 ("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:24:29 +02:00
..
affinity.c
autoprobe.c
chip.c
cpuhotplug.c
debug.h
debugfs.c x86/apic/msi: Plug non-maskable MSI affinity race 2020-02-11 04:34:18 -08:00
devres.c
dummychip.c
generic-chip.c
handle.c
internals.h genirq/proc: Reject invalid affinity masks (again) 2020-02-28 16:38:59 +01:00
ipi.c
irq_sim.c
irqdesc.c
irqdomain.c genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy() 2020-04-17 10:48:41 +02:00
Kconfig
Makefile
manage.c genirq/affinity: Make affinity setting if activated opt-in 2020-08-21 11:05:28 +02:00
matrix.c genirq/matrix: Deal with the sillyness of for_each_cpu() on UP 2020-09-03 11:24:29 +02:00
migration.c
msi.c x86/apic/msi: Plug non-maskable MSI affinity race 2020-02-11 04:34:18 -08:00
pm.c
proc.c genirq/proc: Reject invalid affinity masks (again) 2020-02-28 16:38:59 +01:00
resend.c
settings.h
spurious.c
timings.c