syzbot


KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote

Status: moderation: reported on 2024/03/16 01:56
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+9573fbf76e97a4b394fa@syzkaller.appspotmail.com
First crash: 31d, last: 2d12h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote

write to 0xffff888237d205e4 of 1 bytes by task 0 on cpu 1:
 __tmigr_cpu_deactivate+0x83/0x470 kernel/time/timer_migration.c:1352
 tmigr_cpu_deactivate+0x66/0x180 kernel/time/timer_migration.c:1378
 timer_use_tmigr kernel/time/timer.c:2193 [inline]
 __get_next_timer_interrupt+0x137/0x530 kernel/time/timer.c:2268
 timer_base_try_to_set_idle+0x54/0x60 kernel/time/timer.c:2357
 tick_nohz_stop_tick kernel/time/tick-sched.c:982 [inline]
 tick_nohz_idle_stop_tick+0x15b/0x640 kernel/time/tick-sched.c:1218
 cpuidle_idle_call kernel/sched/idle.c:232 [inline]
 do_idle+0x178/0x230 kernel/sched/idle.c:332
 cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:430
 start_secondary+0x94/0xa0 arch/x86/kernel/smpboot.c:313
 common_startup_64+0x12c/0x137

read to 0xffff888237d205e4 of 1 bytes by interrupt on cpu 0:
 tmigr_next_groupevt kernel/time/timer_migration.c:569 [inline]
 tmigr_next_expired_groupevt kernel/time/timer_migration.c:593 [inline]
 tmigr_handle_remote_up kernel/time/timer_migration.c:1023 [inline]
 __walk_groups kernel/time/timer_migration.c:488 [inline]
 tmigr_handle_remote+0x26e/0x910 kernel/time/timer_migration.c:1091
 run_timer_softirq+0x5f/0x70 kernel/time/timer.c:2452
 __do_softirq+0xc8/0x285 kernel/softirq.c:554
 invoke_softirq kernel/softirq.c:428 [inline]
 __irq_exit_rcu kernel/softirq.c:633 [inline]
 irq_exit_rcu+0x3c/0x90 kernel/softirq.c:645
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0x73/0x80 arch/x86/kernel/apic/apic.c:1043
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline]
 acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x1d/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0xcf/0x270 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x70 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x195/0x230 kernel/sched/idle.c:332
 cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:430
 rest_init+0xef/0xf0 init/main.c:737
 start_kernel+0x57c/0x5e0 init/main.c:1079
 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507
 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:488
 common_startup_64+0x12c/0x137

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.9.0-rc3-syzkaller-00355-g7efd0a74039f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================
TCP: request_sock_subflow_v4: Possible SYN flooding on port [::]:20002. Sending cookies.

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/14 08:47 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/04/12 17:42 upstream 5939d45155bb c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/04/11 04:33 upstream 9875c0beb8ad 33b9e058 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/04/10 11:13 upstream 2c71fdf02a95 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/04/09 20:28 upstream 20cb38a7af88 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/03/26 13:39 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/03/20 16:20 upstream a4145ce1e7bc 5b7d42ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/03/17 10:41 upstream 741e9d668aa5 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/03/16 17:01 upstream 66a27abac311 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
2024/03/16 01:55 upstream 82affc97affb d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_deactivate / tmigr_handle_remote
* Struck through repros no longer work on HEAD.