syzbot


KCSAN: data-race in ktime_get / timekeeping_advance (3)

Status: closed as invalid on 2020/06/18 14:13
Subsystems: kernel
[Documentation on labels]
First crash: 1400d, last: 1400d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ktime_get / timekeeping_advance (2) kernel 3 1484d 1534d 0/26 auto-closed as invalid on 2020/05/14 01:36
upstream KCSAN: data-race in ktime_get / timekeeping_advance kernel 5 1603d 1617d 0/26 closed as invalid on 2019/11/07 21:13

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ktime_get / timekeeping_advance

write to 0xffffffff88ae90c8 of 280 bytes by interrupt on cpu 0:
 timekeeping_advance+0x88e/0xd80 include/linux/string.h:381
 update_wall_time+0x15/0x20 kernel/time/timekeeping.c:2136
 tick_do_update_jiffies64+0x1e5/0x2a0 kernel/time/tick-sched.c:101
 tick_sched_do_timer+0xc7/0xd0 kernel/time/tick-sched.c:147
 tick_sched_timer+0x3f/0xd0 kernel/time/tick-sched.c:1313
 __run_hrtimer kernel/time/hrtimer.c:1520 [inline]
 __hrtimer_run_queues+0x271/0x600 kernel/time/hrtimer.c:1584
 hrtimer_interrupt+0x226/0x490 kernel/time/hrtimer.c:1646
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1113 [inline]
 smp_apic_timer_interrupt+0xd8/0x270 arch/x86/kernel/apic/apic.c:1138
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60
 arch_safe_halt arch/x86/include/asm/paravirt.h:144 [inline]
 default_idle+0x21/0x170 arch/x86/kernel/process.c:697
 cpuidle_idle_call kernel/sched/idle.c:154 [inline]
 do_idle+0x1b7/0x290 kernel/sched/idle.c:269
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:361
 rest_init+0xe4/0xeb init/main.c:667
 arch_call_rest_init+0x13/0x2b
 start_kernel+0x7fe/0x823 init/main.c:1005
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242

read to 0xffffffff88ae90d8 of 8 bytes by interrupt on cpu 1:
 timekeeping_get_delta kernel/time/timekeeping.c:270 [inline]
 timekeeping_get_ns kernel/time/timekeeping.c:374 [inline]
 ktime_get+0xcf/0x210 kernel/time/timekeeping.c:759
 ktime_get_ns include/linux/timekeeping.h:154 [inline]
 tcp_clock_ns include/net/tcp.h:762 [inline]
 tcp_mstamp_refresh+0x19/0x70 net/ipv4/tcp_output.c:55
 tcp_rcv_established+0x81/0xee0 net/ipv4/tcp_input.c:5573
 tcp_v4_do_rcv+0x396/0x4f0 net/ipv4/tcp_ipv4.c:1621
 tcp_v4_rcv+0x1c55/0x1e10 net/ipv4/tcp_ipv4.c:2003
 ip_protocol_deliver_rcu+0x4b/0x410 net/ipv4/ip_input.c:204
 ip_local_deliver_finish+0xf3/0x120 net/ipv4/ip_input.c:231
 NF_HOOK include/linux/netfilter.h:307 [inline]
 NF_HOOK include/linux/netfilter.h:301 [inline]
 ip_local_deliver+0x135/0x220 net/ipv4/ip_input.c:252
 dst_input include/net/dst.h:441 [inline]
 ip_sublist_rcv_finish+0xf0/0x140 net/ipv4/ip_input.c:550
 ip_list_rcv_finish net/ipv4/ip_input.c:600 [inline]
 ip_sublist_rcv+0x3f8/0x530 net/ipv4/ip_input.c:608
 ip_list_rcv+0x2f3/0x321 net/ipv4/ip_input.c:643
 __netif_receive_skb_list_ptype net/core/dev.c:5230 [inline]
 __netif_receive_skb_list_ptype net/core/dev.c:5219 [inline]
 __netif_receive_skb_list_core+0x368/0x5c0 net/core/dev.c:5278
 __netif_receive_skb_list net/core/dev.c:5330 [inline]
 netif_receive_skb_list_internal+0x5c7/0x810 net/core/dev.c:5425
 gro_normal_list.part.0+0x37/0xa0 net/core/dev.c:5536
 gro_normal_list net/core/dev.c:5549 [inline]
 gro_normal_one+0x14c/0x160 net/core/dev.c:5548
 napi_skb_finish net/core/dev.c:5876 [inline]
 napi_gro_receive+0x27d/0x2f0 net/core/dev.c:5908
 receive_buf+0x24c/0x3420 drivers/net/virtio_net.c:1073
 virtnet_receive drivers/net/virtio_net.c:1335 [inline]
 virtnet_poll+0x343/0x790 drivers/net/virtio_net.c:1440
 napi_poll net/core/dev.c:6571 [inline]
 net_rx_action+0x3ad/0xac0 net/core/dev.c:6639
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 run_ksoftirqd+0x41/0x60 kernel/softirq.c:604
 smpboot_thread_fn+0x374/0x4a0 kernel/smpboot.c:165
 kthread+0x203/0x230 kernel/kthread.c:268
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/28 18:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 c7192a2f .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.