linux-stable/arch/s390/kernel
Sven Schnelle 9e3d62d55b s390/topology: clear thread/group maps for offline cpus
The current code doesn't clear the thread/group maps for offline
CPUs. This may cause kernel crashes like the one bewlow in common
code that assumes if a CPU has sibblings it is online.

Unable to handle kernel pointer dereference in virtual kernel address space

Call Trace:
 [<000000013a4b8c3c>] blk_mq_map_swqueue+0x10c/0x388
([<000000013a4b8bcc>] blk_mq_map_swqueue+0x9c/0x388)
 [<000000013a4b9300>] blk_mq_init_allocated_queue+0x448/0x478
 [<000000013a4b9416>] blk_mq_init_queue+0x4e/0x90
 [<000003ff8019d3e6>] loop_add+0x106/0x278 [loop]
 [<000003ff801b8148>] loop_init+0x148/0x1000 [loop]
 [<0000000139de4924>] do_one_initcall+0x3c/0x1e0
 [<0000000139ef449a>] do_init_module+0x6a/0x2a0
 [<0000000139ef61bc>] __do_sys_finit_module+0xa4/0xc0
 [<0000000139de9e6e>] do_syscall+0x7e/0xd0
 [<000000013a8e0aec>] __do_syscall+0xbc/0x110
 [<000000013a8ee2e8>] system_call+0x78/0xa0

Fixes: 52aeda7acc ("s390/topology: remove offline CPUs from CPU topology masks")
Cc: <stable@kernel.org> # 5.7+
Reported-by: Marius Hillenbrand <mhillen@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2021-06-21 11:19:18 +02:00
..
syscalls quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
vdso64 s390/vdso: use union tod_clock 2021-02-13 17:17:54 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
alternative.c
asm-offsets.c s390: add stack for machine check handler 2021-02-13 17:17:53 +01:00
audit.c
audit.h
base.S s390: remove unused s390_base_ext_handler 2020-11-09 11:20:58 +01:00
cache.c
compat_audit.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
cpcmd.c s390/cpcmd: fix inline assembly register clobbering 2021-04-05 11:30:07 +02:00
crash_dump.c elf_prstatus: collect the common part (everything before pr_reg) into a struct 2021-01-06 08:38:29 -05:00
debug.c s390/debug: use union tod_clock 2021-02-13 17:17:54 +01:00
diag.c s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro 2020-09-17 14:11:03 +02:00
dis.c s390/disassembler: increase ebpf disasm buffer size 2021-04-21 12:32:12 +02:00
dumpstack.c s390/unwind: add machine check handler stack 2021-04-05 11:30:07 +02:00
early.c s390/time: convert tod_clock_base to union 2021-02-13 17:17:54 +01:00
early_printk.c s390/sclp: remove unused sclp_early_printk_forced 2020-09-21 08:08:44 +02:00
ebcdic.c
entry.h s390/smp: fix do_restart() prototype 2021-04-18 21:32:02 +02:00
entry.S s390: clear pt_regs::flags on irq entry 2021-06-21 11:19:18 +02:00
fpu.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
ftrace.c Tracing updates for 5.11 2020-12-17 13:22:17 -08:00
guarded_storage.c
head64.S s390/early: rewrite program parameter setup in C 2020-11-09 11:21:00 +01:00
idle.c s390/time,idle: get rid of unsigned long long 2021-03-08 10:46:27 +01:00
ima_arch.c s390/kexec_file: Disable kexec_load when IPLed secure 2019-04-29 10:44:03 +02:00
ipl.c s390/smp: fix do_restart() prototype 2021-04-18 21:32:02 +02:00
ipl_vmparm.c
irq.c s390/irq: fix reading of ext_params2 field from lowcore 2021-04-05 11:30:07 +02:00
jump_label.c s390/jump_label: remove unused structure definition 2019-06-07 10:10:10 +02:00
kdebugfs.c
kexec_elf.c kexec: Fix file verification on S390 2019-09-10 13:27:51 +01:00
kexec_image.c kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE 2019-08-19 21:54:15 -07:00
kprobes.c s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
kprobes_insn_page.S s390/kprobes: move insn_page to text segment 2020-10-09 23:45:30 +02:00
lgr.c s390: convert to msecs_to_jiffies() 2020-06-29 16:31:46 +02:00
machine_kexec.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
machine_kexec_file.c s390/kexec_file: fix initrd location for kdump kernel 2020-05-14 23:21:37 +02:00
machine_kexec_reloc.c s390/kaslr: add support for R_390_JMP_SLOT relocation type 2020-05-20 10:13:27 +02:00
Makefile s390/traps: convert pgm_check.S to C 2021-04-12 12:46:41 +02:00
mcount.S s390/ftrace: assume -mhotpatch or -mrecord-mcount always available 2020-11-20 19:19:11 +01:00
module.c s390/module: Use s390_kernel_write() for late relocations 2020-05-08 00:12:43 +02:00
nmi.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
nospec-branch.c s390 updates for the 5.2 merge window 2019-05-06 16:42:54 -07:00
nospec-sysfs.c
numa.c s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
os_info.c s390/kernel: fix a typo 2021-03-22 11:36:05 +01:00
perf_cpum_cf.c s390/cpumf: remove call to perf_event_update_userpage 2021-04-30 17:17:01 +02:00
perf_cpum_cf_common.c s390/cpumf: move counter set size calculation to common place 2021-04-30 17:17:00 +02:00
perf_cpum_cf_diag.c s390/cpumf: move counter set size calculation to common place 2021-04-30 17:17:00 +02:00
perf_cpum_cf_events.c s390/cpum_cf,perf: change DFLT_CCERROR counter name 2020-07-21 13:53:56 +02:00
perf_cpum_sf.c s390/time: convert tod_clock_base to union 2021-02-13 17:17:54 +01:00
perf_event.c s390: Get rid of oprofile leftovers 2021-04-22 13:32:39 +01:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
process.c arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
processor.c s390/cpuinfo: do not skip info for CPUs without MHz feature 2020-03-23 13:41:55 +01:00
ptrace.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
reipl.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
relocate_kernel.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
runtime_instr.c s390/runtime_instrumentation: fix storage key handling 2020-08-17 13:17:10 +02:00
setup.c s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility 2021-05-04 19:10:56 +02:00
signal.c s390: fix system call restart with multiple signals 2021-06-21 11:19:18 +02:00
smp.c KVM: s390: diag9c (directed yield) forwarding 2021-03-09 10:16:26 +01:00
stacktrace.c stacktrace: Move documentation for arch_stack_walk_reliable() to header 2021-03-10 15:52:31 +01:00
sthyi.c
syscall.c s390/entry: add support for syscall stack randomization 2021-04-30 17:20:39 +02:00
sysinfo.c
time.c s390/vdso: fix initializing and updating of vdso_data 2021-03-25 21:57:26 +01:00
topology.c s390/topology: clear thread/group maps for offline cpus 2021-06-21 11:19:18 +02:00
trace.c s390/ftrace: fix potential crashes when switching tracers 2020-04-22 16:20:55 +02:00
traps.c s390/entry: add support for syscall stack randomization 2021-04-30 17:20:39 +02:00
unwind_bc.c s390/unwind: stop gracefully at user mode pt_regs in irq stack 2019-12-18 23:29:26 +01:00
uprobes.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
uv.c s390/protvirt: fix error return code in uv_info_init() 2021-04-12 12:46:41 +02:00
vdso.c s390/vdso: on timens page fault prefault also VVAR page 2021-02-09 15:57:05 +01:00
vmlinux.lds.S s390/mm: use invalid asce instead of kernel asce 2020-11-23 12:01:12 +01:00
vtime.c s390/vtime: fix increased steal time accounting 2021-03-15 19:09:25 +01:00