syzbot


KCSAN: data-race in expire_timers / try_to_del_timer_sync

Status: fixed on 2021/11/10 00:50
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+abea4558531bae1ba9fe@syzkaller.appspotmail.com
Fix commit: bb7262b29547 timers: Move clearing of base::timer_running under base:: Lock
First crash: 1439d, last: 1023d
Discussions (6)
Title Replies (including bot) Last reply
[PATCH RT 0/4] Linux v4.19.255-rt114-rc2 5 (5) 2022/11/03 07:55
[PATCH 5.10 000/135] 5.10.58-rc1 review 159 (159) 2021/08/19 08:52
[PATCH 5.13 000/175] 5.13.10-rc1 review 183 (183) 2021/08/12 06:45
[PATCH 5.4 00/85] 5.4.140-rc1 review 91 (91) 2021/08/11 22:21
timers: Move clearing of base::timer_running under base::lock 13 (13) 2021/07/27 19:00
[PATCH RT 3/4] timers: Move clearing of base::timer_running under base::lock 1 (1) 2020/12/11 21:41

Sample crash report:
==================================================================
BUG: KCSAN: data-race in expire_timers / try_to_del_timer_sync

write to 0xffff888237d376c8 of 8 bytes by interrupt on cpu 1:
 expire_timers+0x13d/0x250 kernel/time/timer.c:1465
 __run_timers+0x358/0x420 kernel/time/timer.c:1732
 run_timer_softirq+0x19/0x30 kernel/time/timer.c:1745
 __do_softirq+0x12c/0x26e kernel/softirq.c:558
 invoke_softirq kernel/softirq.c:432 [inline]
 __irq_exit_rcu+0x9a/0xb0 kernel/softirq.c:636
 sysvec_apic_timer_interrupt+0x69/0x80 arch/x86/kernel/apic/apic.c:1100
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
 mark_page_accessed+0xcd/0x550 mm/swap.c:430
 touch_buffer fs/buffer.c:63 [inline]
 __find_get_block+0x6fd/0x900 fs/buffer.c:1312
 sb_find_get_block include/linux/buffer_head.h:340 [inline]
 recently_deleted fs/ext4/ialloc.c:687 [inline]
 find_inode_bit+0x181/0x330 fs/ext4/ialloc.c:729
 __ext4_new_inode+0xc7a/0x2f70 fs/ext4/ialloc.c:1064
 ext4_symlink+0x2c3/0x700 fs/ext4/namei.c:3465
 vfs_symlink+0x23a/0x300 fs/namei.c:4182
 do_symlinkat+0xeb/0x280 fs/namei.c:4212
 __do_sys_symlink fs/namei.c:4233 [inline]
 __se_sys_symlink fs/namei.c:4231 [inline]
 __x64_sys_symlink+0x32/0x40 fs/namei.c:4231
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237d376c8 of 8 bytes by task 11 on cpu 0:
 try_to_del_timer_sync+0xe3/0x290 kernel/time/timer.c:1233
 del_timer_sync kernel/time/timer.c:1380 [inline]
 schedule_timeout+0x108/0x240 kernel/time/timer.c:1880
 rcu_gp_fqs_loop kernel/rcu/tree.c:1996 [inline]
 rcu_gp_kthread+0xbf7/0xec0 kernel/rcu/tree.c:2169
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

value changed: 0xffffc90000277e60 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11 Comm: rcu_sched Not tainted 5.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1029):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/08 19:25 upstream 66745863ecde 6972b106 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/07 22:31 upstream 85a90500f9a1 6972b106 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/07 08:10 upstream c9194f32bfd9 6972b106 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/06 19:50 upstream 894d6f401b21 6972b106 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/06 04:23 upstream 902e7f373fff 2f537099 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/05 19:44 upstream e04480920d1e d2d6e680 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/05 16:09 upstream 251a1524293d d2d6e680 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/05 04:00 upstream 251a1524293d 7f7bb950 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/04 20:47 upstream 251a1524293d b97d64c9 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/03 17:23 upstream d5ad8ec3cfb5 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/02 10:24 upstream c500bee1c5b2 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/08/01 21:03 upstream d4affd6b6e81 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/31 22:05 upstream f3438b4c4e69 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/31 09:08 upstream c7d102232649 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/30 17:58 upstream 764a5bc89b12 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/30 05:53 upstream 764a5bc89b12 c585c7b0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/29 18:10 upstream 7e96bf476270 8a799410 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/29 16:30 upstream 4010a528219e 8a799410 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/29 04:19 upstream 4010a528219e b44001ce .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/28 18:36 upstream 4010a528219e 9a4781d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/28 16:52 upstream 7d549995d4e0 9a4781d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/28 02:02 upstream 7d549995d4e0 17d6ab15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/27 16:54 upstream ff1176468d36 17d6ab15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/26 09:46 upstream ff1176468d36 fd511809 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/26 02:47 upstream ff1176468d36 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/25 13:12 upstream d8079fac1681 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/25 00:59 upstream 7ffca2bb9d8b 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/24 09:57 upstream f0fddcec6b62 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/24 04:13 upstream f0fddcec6b62 bc5f1d88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/23 14:43 upstream 8baef6386baa bc5f1d88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/23 00:09 upstream 9bead1b58c4c bc5f1d88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/22 11:36 upstream 3d5895cd3517 241790bb .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/22 10:08 upstream 3d5895cd3517 29c3f20f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/21 21:18 upstream 7b6ae471e541 29c3f20f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/21 17:39 upstream 8cae8cd89f05 29c3f20f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/20 13:54 upstream 8cae8cd89f05 1b201b48 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/20 12:25 upstream 2734d6c1b1a0 1b201b48 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/19 23:00 upstream 2734d6c1b1a0 bc48c9ab .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/19 10:44 upstream 2734d6c1b1a0 e6a17580 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/19 09:12 upstream 2734d6c1b1a0 f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/18 19:55 upstream f0eb870a8422 f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/18 00:59 upstream 1d67c8d993ba f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/17 13:24 upstream d980cc0620ae f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/16 22:24 upstream 0d18c12b288a f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/16 10:31 upstream d936eb238744 f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/15 19:50 upstream dd9c7df94c1b f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/15 15:52 upstream 8096acd7442e f115ae98 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/07/15 00:28 upstream 8096acd7442e b9a2f64e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in expire_timers / try_to_del_timer_sync
2021/01/17 10:22 upstream 0da0a8a0a0e1 813be542 .config console log report info ci2-upstream-kcsan-gce
2020/06/29 15:46 upstream 9ebcfadb0610 ce9ef6f2 .config console log report ci2-upstream-kcsan-gce
2020/06/28 08:15 upstream 916a3b0fc120 a2cdad9d .config console log report ci2-upstream-kcsan-gce
2020/06/18 14:24 upstream 1b5044021070 3ea11d3f .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.