syzbot


KCSAN: data-race in __mod_timer / blk_add_timer (9)

Status: moderation: reported on 2024/06/14 18:23
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+011d38c71c1be15b2ae7@syzkaller.appspotmail.com
First crash: 34d, last: 34d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mod_timer / blk_add_timer (6) block 1 471d 451d 0/27 auto-obsoleted due to no activity on 2023/05/09 08:21
upstream KCSAN: data-race in __mod_timer / blk_add_timer block 2 1155d 1189d 0/27 auto-closed as invalid on 2021/06/25 00:11
upstream KCSAN: data-race in __mod_timer / blk_add_timer (3) block 8 930d 1028d 0/27 auto-closed as invalid on 2022/02/04 22:18
upstream KCSAN: data-race in __mod_timer / blk_add_timer (2) block 2 1080d 1110d 0/27 auto-closed as invalid on 2021/09/07 18:24
upstream KCSAN: data-race in __mod_timer / blk_add_timer (4) block 2 837d 856d 0/27 auto-closed as invalid on 2022/05/08 11:46
upstream KCSAN: data-race in __mod_timer / blk_add_timer (7) block 2 391d 408d 0/27 auto-obsoleted due to no activity on 2023/07/28 08:54
upstream KCSAN: data-race in __mod_timer / blk_add_timer (5) block 1 693d 693d 0/27 auto-closed as invalid on 2022/09/29 13:43
upstream KCSAN: data-race in __mod_timer / blk_add_timer (8) block 7 184d 222d 0/27 auto-obsoleted due to no activity on 2024/02/20 17:38

Sample crash report:
loop4: detected capacity change from 0 to 512
==================================================================
BUG: KCSAN: data-race in __mod_timer / blk_add_timer

write to 0xffff888101060158 of 8 bytes by task 369 on cpu 1:
 __mod_timer+0x578/0x7f0 kernel/time/timer.c:1173
 mod_timer+0x1f/0x30 kernel/time/timer.c:1242
 blk_mq_timeout_work+0x185/0x350 block/blk-mq.c:1659
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
 worker_thread+0x526/0x730 kernel/workqueue.c:3393
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888101060158 of 8 bytes by task 7275 on cpu 0:
 blk_add_timer+0x112/0x190
 blk_mq_start_request+0x185/0x3b0 block/blk-mq.c:1263
 loop_queue_rq+0x44/0x660 drivers/block/loop.c:1843
 __blk_mq_issue_directly block/blk-mq.c:2577 [inline]
 blk_mq_request_issue_directly+0x1e1/0x340 block/blk-mq.c:2662
 blk_mq_plug_issue_direct+0x15c/0x530 block/blk-mq.c:2683
 blk_mq_flush_plug_list+0x2b6/0xde0 block/blk-mq.c:2792
 __blk_flush_plug+0x216/0x290 block/blk-core.c:1194
 blk_finish_plug+0x48/0x70 block/blk-core.c:1221
 __ext4_get_inode_loc+0x712/0x910 fs/ext4/inode.c:4455
 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4475 [inline]
 __ext4_iget+0x311/0x1e80 fs/ext4/inode.c:4697
 __ext4_fill_super fs/ext4/super.c:5447 [inline]
 ext4_fill_super+0x2fba/0x39e0 fs/ext4/super.c:5676
 get_tree_bdev+0x253/0x2e0 fs/super.c:1615
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5708
 vfs_get_tree+0x56/0x1d0 fs/super.c:1780
 do_new_mount+0x227/0x690 fs/namespace.c:3352
 path_mount+0x49b/0xb30 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3875
 x64_sys_call+0x25c9/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000100009ff5 -> 0x000000010000a939

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7275 Comm: syz-executor.4 Tainted: G        W          6.10.0-rc3-syzkaller-00109-g0cac73eb3875 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================
EXT4-fs error (device loop4): __ext4_iget:4906: inode #11: block 2071: comm syz-executor.4: invalid block
EXT4-fs error (device loop4): ext4_orphan_get:1399: comm syz-executor.4: couldn't read orphan inode 11 (err -117)
EXT4-fs (loop4): 1 truncate cleaned up
EXT4-fs (loop4): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/14 18:23 upstream 0cac73eb3875 8d849073 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_timer / blk_add_timer
* Struck through repros no longer work on HEAD.