syzbot


KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events

Status: moderation: reported on 2024/05/16 13:31
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+4dd1dd2e87e81f3d1b95@syzkaller.appspotmail.com
First crash: 32d, last: 11h21m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events

write to 0xffff888237d205e4 of 1 bytes by task 0 on cpu 1:
 __tmigr_cpu_activate+0x55/0x1f0 kernel/time/timer_migration.c:682
 tmigr_cpu_activate+0x8a/0xc0 kernel/time/timer_migration.c:705
 timer_clear_idle+0x28/0x100 kernel/time/timer.c:2379
 tick_nohz_restart_sched_tick+0x22/0x110 kernel/time/tick-sched.c:1095
 tick_nohz_idle_update_tick kernel/time/tick-sched.c:1440 [inline]
 tick_nohz_idle_exit+0xfe/0x1d0 kernel/time/tick-sched.c:1483
 do_idle+0x1ee/0x230 kernel/sched/idle.c:345
 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 task 0 on cpu 0:
 tmigr_next_groupevt kernel/time/timer_migration.c:569 [inline]
 tmigr_next_groupevt_expires kernel/time/timer_migration.c:611 [inline]
 tmigr_update_events+0x41d/0x5d0 kernel/time/timer_migration.c:846
 tmigr_inactive_up kernel/time/timer_migration.c:1318 [inline]
 __walk_groups kernel/time/timer_migration.c:488 [inline]
 walk_groups kernel/time/timer_migration.c:500 [inline]
 __tmigr_cpu_deactivate+0x283/0x470 kernel/time/timer_migration.c:1354
 tmigr_cpu_deactivate+0x66/0x180 kernel/time/timer_migration.c:1378
 timer_use_tmigr kernel/time/timer.c:2192 [inline]
 __get_next_timer_interrupt+0x137/0x530 kernel/time/timer.c:2267
 timer_base_try_to_set_idle+0x54/0x60 kernel/time/timer.c:2356
 tick_nohz_stop_tick kernel/time/tick-sched.c:987 [inline]
 tick_nohz_idle_stop_tick+0x15b/0x640 kernel/time/tick-sched.c:1226
 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
 rest_init+0xef/0xf0 init/main.c:747
 start_kernel+0x581/0x5e0 init/main.c:1103
 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: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.10.0-rc4-syzkaller-00007-g6226e74900d7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/18 02:05 upstream 6226e74900d7 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/17 11:40 upstream 6ba59ff42279 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/16 05:28 upstream a3e18a540541 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/15 06:10 upstream c286c21ff942 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/14 17:24 upstream d20f6b3d747c 8d849073 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/12 21:02 upstream cea2a26553ac f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/06/06 01:43 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/05/31 23:23 upstream d8ec19857b09 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/05/21 07:30 upstream 8f6a15f095a6 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
2024/05/16 13:30 upstream 3c999d1ae3c7 ef5d53ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tmigr_cpu_activate / tmigr_update_events
* Struck through repros no longer work on HEAD.