linux/arch/um/kernel
Johannes Berg dbbf6d4713 um: init cpu_tasks[] earlier
[ Upstream commit 7b5d441696 ]

This is currently done in uml_finishsetup(), but e.g. with
KCOV enabled we'll crash because some init code can call
into e.g. memparse(), which has coverage annotations, and
then the checks in check_kcov_mode() crash because current
is NULL.

Simply initialize the cpu_tasks[] array statically, which
fixes the crash. For the later SMP work, it seems to have
not really caused any problems yet, but initialize all of
the entries anyway.

Link: https://patch.msgid.link/20250924113214.c76cd74d0583.I974f691ebb1a2b47915bd2b04cc38e5263b9447f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-02 12:56:59 +01:00
..
skas um: Stop tracking stub's PID via userspace_pid[] 2025-07-13 19:42:49 +02:00
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dtb.c um: Add missing trailing newline to help messages 2025-09-10 14:23:37 +02:00
dyn.lds.S um: move thread info into task 2024-11-12 14:50:31 +01:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Stop tracking stub's PID via userspace_pid[] 2025-07-13 19:42:49 +02:00
exitcode.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Do not propagate initrd parameter to kernel 2024-10-23 09:52:49 +02:00
irq.c um: Support SPARSE_IRQ 2025-09-10 14:23:30 +02:00
kmsg_dump.c printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
ksyms.c um: generalize os_rcv_fd 2024-07-03 12:24:25 +02:00
load_file.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
Makefile Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
mem.c kasan: introduce ARCH_DEFER_KASAN and unify static key across modes 2025-09-21 14:21:58 -07:00
physmem.c arch, mm: set max_mapnr when allocating memory map for FLATMEM 2025-03-17 22:06:52 -07:00
process.c um: init cpu_tasks[] earlier 2026-01-02 12:56:59 +01:00
ptrace.c um/ptrace: Implement HAVE_SYSCALL_TRACEPOINTS 2025-07-11 08:49:02 +02:00
reboot.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
sigio.c um: Rewrite the sigio workaround based on epoll and tgkill 2025-03-20 09:28:44 +01:00
signal.c um: Drop support for hosts without SYSEMU_SINGLESTEP support 2024-01-04 23:29:11 +01:00
stacktrace.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sysrq.c um: Always dump trace for specified task in show_stack 2024-11-07 18:05:22 +01:00
time.c um: Indent time-travel help messages 2025-09-10 14:23:45 +02:00
tlb.c um: Rename _PAGE_NEWPAGE to _PAGE_NEEDSYNC 2024-10-23 09:52:49 +02:00
trap.c Notable changes: 2025-06-05 11:45:33 -07:00
um_arch.c um: init cpu_tasks[] earlier 2026-01-02 12:56:59 +01:00
um_arch.h um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
umid.c uml: Remove the initialization of statics to 0 2022-09-19 23:10:07 +02:00
uml.lds.S um: move thread info into task 2024-11-12 14:50:31 +01:00
vmlinux.lds.S UML: define RUNTIME_DISCARD_EXIT 2023-02-13 10:14:31 +01:00