syzbot


linux-next boot error: BUG: sleeping function called from invalid context in cpu_bugs_smt_update

Status: closed as invalid on 2023/07/03 08:31
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+bdc9ec9be68959140dbf@syzkaller.appspotmail.com
First crash: 469d, last: 469d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] linux-next boot error: BUG: sleeping function called from invalid context in cpu_bugs_smt_update 2 (3) 2023/07/03 08:31

Sample crash report:
smpboot: CPU0: Intel(R) Xeon(R) CPU @ 2.20GHz (family: 0x6, model: 0x4f, stepping: 0x0)
RCU Tasks: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1.
RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1.
Running RCU-tasks wait API self tests
Performance Events: unsupported p6 CPU model 79 no PMU driver, software events only.
signal: max sigframe size: 1776
rcu: Hierarchical SRCU implementation.
rcu: 	Max phase no-delay instances is 1000.
NMI watchdog: Perf NMI watchdog permanently disabled
smp: Bringing up secondary CPUs ...
smpboot: x86: Booting SMP configuration:
.... node  #0, CPUs:      #1
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
1 lock held by swapper/0/1:
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_maps_update_begin kernel/cpu.c:469 [inline]
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_up kernel/cpu.c:1696 [inline]
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_up+0xbc/0x200 kernel/cpu.c:1679
Preemption disabled at:
[<ffffffff81363069>] wakeup_secondary_cpu_via_init arch/x86/kernel/smpboot.c:888 [inline]
[<ffffffff81363069>] do_boot_cpu arch/x86/kernel/smpboot.c:1087 [inline]
[<ffffffff81363069>] native_kick_ap+0x969/0x1030 arch/x86/kernel/smpboot.c:1124
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.4.0-next-20230627-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
 __might_resched+0x358/0x580 kernel/sched/core.c:10189
 __mutex_lock_common kernel/locking/mutex.c:580 [inline]
 __mutex_lock+0x9f/0x1350 kernel/locking/mutex.c:747
 cpu_bugs_smt_update+0x1b/0x440 arch/x86/kernel/cpu/bugs.c:1633
 arch_smt_update+0x9/0x10 arch/x86/kernel/cpu/common.c:2326
 _cpu_up+0x3d0/0x940 kernel/cpu.c:1674
 cpu_up kernel/cpu.c:1707 [inline]
 cpu_up+0xfe/0x200 kernel/cpu.c:1679
 cpuhp_bringup_mask+0xdc/0x210 kernel/cpu.c:1773
 cpuhp_bringup_cpus_parallel kernel/cpu.c:1837 [inline]
 bringup_nonboot_cpus+0x15f/0x1a0 kernel/cpu.c:1848
 smp_init+0x32/0x150 kernel/smp.c:969
 kernel_init_freeable+0x425/0xba0 init/main.c:1540
 kernel_init+0x1e/0x2c0 init/main.c:1437
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
BUG: scheduling while atomic: swapper/0/1/0x00000002
3 locks held by swapper/0/1:
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_maps_update_begin kernel/cpu.c:469 [inline]
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_up kernel/cpu.c:1696 [inline]
 #0: ffffffff8c849728 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_up+0xbc/0x200 kernel/cpu.c:1679
 #1: ffffffff8c849670 (cpu_hotplug_lock){++++}-{0:0}, at: cpus_write_lock kernel/cpu.c:507 [inline]
 #1: ffffffff8c849670 (cpu_hotplug_lock){++++}-{0:0}, at: _cpu_up+0x66/0x940 kernel/cpu.c:1619
 #2: ffffffff8c9970a8 (sparse_irq_lock){+.+.}-{3:3}, at: cpuhp_bringup_ap+0x65/0x340 kernel/cpu.c:798
Modules linked in:
Preemption disabled at:
[<ffffffff81363069>] wakeup_secondary_cpu_via_init arch/x86/kernel/smpboot.c:888 [inline]
[<ffffffff81363069>] do_boot_cpu arch/x86/kernel/smpboot.c:1087 [inline]
[<ffffffff81363069>] native_kick_ap+0x969/0x1030 arch/x86/kernel/smpboot.c:1124

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/27 08:25 linux-next 53cdf865f90b 4cd5bb25 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cpu_bugs_smt_update
2023/06/27 08:24 linux-next 53cdf865f90b 4cd5bb25 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cpu_bugs_smt_update
2023/06/27 08:24 linux-next 53cdf865f90b 4cd5bb25 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cpu_bugs_smt_update
* Struck through repros no longer work on HEAD.