syzbot


KCSAN: data-race in __mod_timer / update_process_times

Status: auto-closed as invalid on 2021/10/31 20:49
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 425d, last: 425d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __mod_timer / update_process_times

write to 0xffff888237d176d8 of 8 bytes by interrupt on cpu 0:
 enqueue_timer kernel/time/timer.c:598 [inline]
 __mod_timer+0x8c6/0xbf0 kernel/time/timer.c:1060
 mod_timer+0x1b/0x20 kernel/time/timer.c:1108
 sk_reset_timer+0x1f/0xa0 net/core/sock.c:3080
 inet_csk_reset_xmit_timer include/net/inet_connection_sock.h:232 [inline]
 tcp_reset_xmit_timer include/net/tcp.h:1307 [inline]
 tcp_schedule_loss_probe+0x2f6/0x310 net/ipv4/tcp_output.c:2771
 tcp_write_xmit+0x2357/0x3b90 net/ipv4/tcp_output.c:2721
 tcp_tsq_write+0x15b/0x170 net/ipv4/tcp_output.c:1022
 tcp_tsq_handler+0xb0/0x110 net/ipv4/tcp_output.c:1031
 tcp_tasklet_func+0x1e1/0x230 net/ipv4/tcp_output.c:1063
 tasklet_action_common+0xc3/0x140
 __do_softirq+0x12c/0x26e kernel/softirq.c:558
 invoke_softirq kernel/softirq.c:432 [inline]
 __irq_exit_rcu kernel/softirq.c:636 [inline]
 irq_exit_rcu+0x4e/0xa0 kernel/softirq.c:648
 common_interrupt+0x78/0x90 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x1e/0x40
 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:109 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:553 [inline]
 acpi_idle_enter+0x258/0x2e0 drivers/acpi/processor_idle.c:688
 cpuidle_enter_state+0x2b4/0x760 drivers/cpuidle/cpuidle.c:237
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:351
 call_cpuidle kernel/sched/idle.c:158 [inline]
 cpuidle_idle_call kernel/sched/idle.c:239 [inline]
 do_idle+0x1a3/0x250 kernel/sched/idle.c:306
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:403
 rest_init+0xee/0x100 init/main.c:733
 arch_call_rest_init+0xa/0xb
 start_kernel+0x5e4/0x669 init/main.c:1141
 secondary_startup_64_no_verify+0xb1/0xbb

read to 0xffff888237d176d8 of 8 bytes by interrupt on cpu 1:
 run_local_timers kernel/time/timer.c:1761 [inline]
 update_process_times+0x8c/0x150 kernel/time/timer.c:1784
 tick_sched_handle kernel/time/tick-sched.c:226 [inline]
 tick_sched_timer+0x191/0x210 kernel/time/tick-sched.c:1421
 __run_hrtimer+0x160/0x480 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_interrupt+0x380/0xaf0 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0x6f/0x1c0 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x64/0x80 arch/x86/kernel/apic/apic.c:1097
 asm_sysvec_apic_timer_interrupt+0x12/0x20
 _raw_spin_unlock_irqrestore+0x34/0x40 kernel/locking/spinlock.c:195
 unlock_hrtimer_base kernel/time/hrtimer.c:1017 [inline]
 hrtimer_start_range_ns+0x11e/0x140 kernel/time/hrtimer.c:1301
 hrtimer_start_expires include/linux/hrtimer.h:432 [inline]
 hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1965 [inline]
 do_nanosleep+0x97/0x3a0 kernel/time/hrtimer.c:2041
 hrtimer_nanosleep kernel/time/hrtimer.c:2097 [inline]
 __do_sys_nanosleep kernel/time/hrtimer.c:2131 [inline]
 __se_sys_nanosleep+0x22e/0x2f0 kernel/time/hrtimer.c:2118
 __x64_sys_nanosleep+0x2d/0x40 kernel/time/hrtimer.c:2118
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000100001965 -> 0x000000010000195b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1088 Comm: syz-fuzzer Not tainted 5.15.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
sd 0:0:1:0: tag#4224 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s
sd 0:0:1:0: tag#4224 CDB: opcode=0xe5 (vendor)
sd 0:0:1:0: tag#4224 CDB[00]: e5 f4 32 73 2f 4e 09 6d 26 e2 c7 35 d1 35 12 1c
sd 0:0:1:0: tag#4224 CDB[10]: 92 1b da 40 b8 58 5b a8 d4 7d 34 f3 90 4c f1 2d
sd 0:0:1:0: tag#4224 CDB[20]: ba

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/26 20:40 upstream 996148ee05d0 78494d16 .config log report info KCSAN: data-race in __mod_timer / update_process_times
* Struck through repros no longer work on HEAD.