linux/kernel
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
..
bpf bpf: sockmap: Require attach_bpf_fd when detaching a program 2020-08-07 09:34:02 +02:00
cgroup cgroup: fix cgroup_sk_alloc() for sk_clone_lock() 2020-07-22 09:32:49 +02:00
configs
debug kgdb: Avoid suspicious RCU usage warning 2020-07-09 09:37:51 +02:00
dma dma-direct: fix data truncation in dma_direct_get_required_mask() 2020-04-29 16:33:00 +02:00
events uprobes: __replace_page() avoid BUG in munlock_vma_page() 2020-08-26 10:40:51 +02:00
gcov kernel/gcov/fs.c: gcov_seq_next() should increase position index 2020-04-29 16:33:00 +02:00
irq genirq/matrix: Deal with the sillyness of for_each_cpu() on UP 2020-09-03 11:27:06 +02:00
livepatch
locking locking/lockdep: Fix overflow in presentation of average lock-time 2020-09-03 11:26:47 +02:00
power PM: hibernate: Freeze kernel threads in software_resume() 2020-05-06 08:15:09 +02:00
printk printk: queue wake_up_klogd irq_work only if per-CPU areas are ready 2020-05-02 08:48:42 +02:00
rcu rcu: Allow only one expedited GP to run concurrently with wakeups 2020-03-05 16:43:50 +01:00
sched sched/uclamp: Fix a deadlock when enabling uclamp static key 2020-09-03 11:26:49 +02:00
time random32: update the net random state on interrupt and activity 2020-08-07 09:34:01 +02:00
trace blktrace: ensure our debugfs dir exists 2020-09-03 11:26:42 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
Makefile
acct.c
async.c
audit.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:30:59 +02:00
audit.h audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:30:59 +02:00
audit_fsnotify.c
audit_tree.c
audit_watch.c
auditfilter.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:30:59 +02:00
auditsc.c
backtracetest.c
bounds.c
capability.c
compat.c
configs.c
context_tracking.c
cpu.c sched/core: Fix illegal RCU from offline CPUs 2020-06-22 09:31:01 +02:00
cpu_pm.c kernel/cpu_pm: Fix uninitted local in cpu_pm 2020-06-22 09:31:22 +02:00
crash_core.c
crash_dump.c
cred.c keys: Fix request_key() cache 2020-01-17 19:48:42 +01:00
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c exit: Move preemption fixup up, move blocking operations down 2020-06-22 09:31:01 +02:00
extable.c
fail_function.c
fork.c fork: prevent accidental access to clone3 features 2020-05-20 08:20:22 +02:00
freezer.c
futex.c futex: Unbreak futex hashing 2020-03-25 08:25:58 +01:00
gen_kheaders.sh
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c kallsyms: Refactor kallsyms_show_value() to take cred 2020-07-16 08:16:44 +02:00
kcmp.c
kcov.c
kexec.c
kexec_core.c
kexec_elf.c
kexec_file.c
kexec_internal.h
kheaders.c
kmod.c kmod: make request_module() return an error when autoloading is disabled 2020-04-17 10:50:22 +02:00
kprobes.c kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler 2020-08-21 13:05:27 +02:00
ksysfs.c
kthread.c kthread: Do not preempt current task if it is going to call schedule() 2020-08-26 10:40:53 +02:00
latencytop.c
module-internal.h
module.c module: Correctly truncate sysfs sections output 2020-08-21 13:05:28 +02:00
module_signature.c
module_signing.c
notifier.c x86/mm: split vmalloc_sync_all() 2020-03-25 08:25:58 +01:00
nsproxy.c
padata.c padata: add separate cpuhp node for CPUHP_PADATA_DEAD 2020-06-17 16:40:22 +02:00
panic.c
params.c
pid.c
pid_namespace.c
profile.c
ptrace.c ptrace: reintroduce usage of subjective credentials in ptrace_has_cap() 2020-01-23 08:22:36 +01:00
range.c
reboot.c
relay.c kernel/relay.c: fix memleak on destroy relay channel 2020-08-26 10:40:51 +02:00
resource.c /dev/mem: Revoke mappings when a driver claims the region 2020-06-24 17:50:35 +02:00
rseq.c
seccomp.c seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID 2020-08-19 08:15:58 +02:00
signal.c signal: check sig before setting info in kill_pid_usb_asyncio 2020-05-02 08:48:55 +02:00
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
stop_machine.c
sys.c
sys_ni.c
sysctl.c kernel: sysctl: make drop_caches write-only 2020-01-04 19:18:32 +01:00
sysctl_binary.c
task_work.c
taskstats.c taskstats: fix data-race 2020-01-09 10:19:54 +01:00
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c umh: fix memory leak on execve failure 2020-05-20 08:20:13 +02:00
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c watchdog/softlockup: Enforce that timestamp is valid on boot 2020-02-24 08:36:52 +01:00
watchdog_hld.c
workqueue.c workqueue: don't use wq_select_unbound_cpu() for bound works 2020-03-18 07:17:50 +01:00
workqueue_internal.h