syzbot


KCSAN: data-race in internal_add_timer / update_process_times

Status: auto-closed as invalid on 2021/12/12 04:34
Reported-by: syzbot+809a807a59ccfea577bb@syzkaller.appspotmail.com
First crash: 591d, last: 388d

Sample crash report:
sd 0:0:1:0: tag#7741 CDB[00]: e5 f4 32 73 2f 4e 09 6d 26 e2 c7 35 d1 35 12 1c
sd 0:0:1:0: tag#7741 CDB[10]: 92 1b da 40 b8 58 5b a8 d4 7d 34 f3 90 4c f1 2d
sd 0:0:1:0: tag#7741 CDB[20]: ba
==================================================================
BUG: KCSAN: data-race in internal_add_timer / update_process_times

write to 0xffff888237c1b858 of 8 bytes by interrupt on cpu 1:
 enqueue_timer kernel/time/timer.c:598 [inline]
 internal_add_timer+0x14f/0x2b0 kernel/time/timer.c:611
 add_timer_on+0x247/0x280 kernel/time/timer.c:1182
 clocksource_watchdog+0xa96/0xac0 kernel/time/clocksource.c:478
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1421
 expire_timers+0x116/0x240 kernel/time/timer.c:1466
 __run_timers+0x368/0x410 kernel/time/timer.c:1734
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1747
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 __irq_exit_rcu kernel/softirq.c:636 [inline]
 irq_exit_rcu+0x37/0x70 kernel/softirq.c:648
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1097
 asm_sysvec_apic_timer_interrupt+0x12/0x20
 is_atomic kernel/kcsan/core.c:238 [inline]
 should_watch kernel/kcsan/core.c:266 [inline]
 check_access kernel/kcsan/core.c:633 [inline]
 __tsan_read8+0x11a/0x180 kernel/kcsan/core.c:855
 __list_del_entry include/linux/list.h:135 [inline]
 list_del_init include/linux/list.h:204 [inline]
 ep_send_events fs/eventpoll.c:1678 [inline]
 ep_poll fs/eventpoll.c:1799 [inline]
 do_epoll_wait+0x600/0xf40 fs/eventpoll.c:2227
 __do_sys_epoll_wait fs/eventpoll.c:2239 [inline]
 __se_sys_epoll_wait fs/eventpoll.c:2234 [inline]
 __x64_sys_epoll_wait+0x119/0x140 fs/eventpoll.c:2234
 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

read to 0xffff888237c1b858 of 8 bytes by interrupt on cpu 0:
 run_local_timers kernel/time/timer.c:1761 [inline]
 update_process_times+0x9c/0x160 kernel/time/timer.c:1784
 tick_sched_handle kernel/time/tick-sched.c:226 [inline]
 tick_sched_timer+0x19d/0x220 kernel/time/tick-sched.c:1421
 __run_hrtimer+0x163/0x460 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_interrupt+0x37e/0xac0 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0xa3/0x240 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x88/0xb0 arch/x86/kernel/apic/apic.c:1097
 asm_sysvec_apic_timer_interrupt+0x12/0x20
 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+0x282/0x300 drivers/acpi/processor_idle.c:688
 cpuidle_enter_state+0x2b4/0x7d0 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+0x1b2/0x250 kernel/sched/idle.c:306
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:403
 rest_init+0xfa/0x100 init/main.c:725
 arch_call_rest_init+0xa/0xb
 start_kernel+0x5e4/0x669 init/main.c:1133
 secondary_startup_64_no_verify+0xb1/0xbb

value changed: 0x00000001000087c0 -> 0x0000000100008053

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (100):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/07 04:34 upstream 512b7931ad05 4c1be0be .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/11/03 08:49 upstream 56d33754481f 17f3edd2 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/31 12:52 upstream 180eca540ae0 098b5d53 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/31 05:37 upstream 119c85055d86 098b5d53 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/30 14:44 upstream a379fbbcb88b 098b5d53 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/29 10:30 upstream f25a5481af12 2353a3ec .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/27 23:07 upstream 1fc596a56b33 be531bb4 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/23 12:45 upstream 9c0c4d24ac00 282f03fb .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/23 05:48 upstream 64222515138e 282f03fb .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/20 17:03 upstream d9abdee5fd5a 418a00eb .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/18 20:09 upstream 519d81956ee2 24dc29db .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/17 08:20 upstream d999ade1cc86 0c5d9412 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/17 01:54 upstream 304040fb4909 0c5d9412 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/15 03:39 upstream 26d657410983 7aa5fe41 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/14 00:25 upstream 348949d9a444 5462d470 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/09 19:25 upstream 5d6ab0bb408f 838e7e2c .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/09 01:22 upstream 741668ef7832 efe0f24d .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/07 08:19 upstream 5af4055fa813 62ee0987 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/06 05:23 upstream 60a9483534ed 0a63fd36 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/05 14:03 upstream f6274b06e326 8a6b1a8d .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/10/01 13:15 upstream 4de593fb965f 1d849ab4 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/26 04:01 upstream 85736168463d 8cac236e .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/24 04:12 upstream f10f0481a5b5 8cac236e .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/20 15:58 upstream e4e737bb5c17 3d9c9a2a .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/18 21:54 upstream 93ff9f13be91 70b76c1d .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/16 10:58 upstream ff1ffd71d5f0 07e953c1 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/14 22:57 upstream 1619b69edce1 07e953c1 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/14 00:09 upstream 316346243be6 58d09404 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/11 18:11 upstream 926de8c4326c 3ce60af8 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/10 04:43 upstream bf9f243f23e6 e2776ee4 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/08 23:00 upstream 2d338201d531 e2776ee4 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/07 20:40 upstream 0bcfe68b8767 064c9eb7 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/02 22:41 upstream 7ba88a2a09f4 f62a5829 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/09/02 18:42 upstream 4ac6d90867a4 d0f0970b .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/31 12:40 upstream b91db6a0b52e 8f58a0ef .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/28 23:40 upstream 3f5ad13cb012 be2c130d .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/24 23:34 upstream 6e764bcd1cf7 b599f2fc .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/24 02:23 upstream d5ae8d7f85b7 b599f2fc .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/20 04:38 upstream f87d64319e6f b599f2fc .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/18 10:13 upstream 614cb2751d31 a2fe1cb5 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/18 02:19 upstream 794c7931a242 a2fe1cb5 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/16 10:59 upstream 7c60610d4767 6652437d .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/14 19:22 upstream ba31f97d43be 2489ab88 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/13 06:07 upstream f8e6dfc64f61 3fd2ea69 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/12 21:00 upstream f8fbb47c6e86 c551a195 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/10 07:03 upstream 9a73fa375d58 6972b106 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/08 21:03 upstream 66745863ecde 6972b106 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/07 12:49 upstream c9194f32bfd9 6972b106 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/06 04:16 upstream 902e7f373fff 2f537099 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/05 16:45 upstream 251a1524293d d2d6e680 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/03 19:40 upstream d5ad8ec3cfb5 6c236867 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/08/02 03:45 upstream d4affd6b6e81 6c236867 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/05/02 21:29 upstream 17ae69aba89d 77e2b668 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/30 00:00 upstream 8ca5297e7e38 77e2b668 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/25 12:30 upstream 2a1d7946fa53 36c88236 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/21 19:16 upstream 16fc44d6387e 95777977 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/21 01:21 upstream 1fe5501ba1ab c0ced557 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/19 22:55 upstream 7af08140979a 4285c989 .config log report info KCSAN: data-race in internal_add_timer / update_process_times
ci2-upstream-kcsan-gce 2021/04/18 09:06 upstream 194cf4825638 7e2b734b .config log report info KCSAN: data-race in internal_add_timer / update_process_times
* Struck through repros no longer work on HEAD.