syzbot


KCSAN: data-race in blk_mq_start_request / bt_for_each (4)

Status: moderation: reported on 2025/09/04 17:14
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+cef23fee9615d8ef7a5f@syzkaller.appspotmail.com
First crash: 13h33m, last: 13h33m
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in blk_mq_start_request / bt_for_each (3) block 6 1 203d 203d 0/29 auto-obsoleted due to no activity on 2025/04/10 10:24
upstream KCSAN: data-race in blk_mq_start_request / bt_for_each (2) block 6 3 316d 370d 0/29 auto-obsoleted due to no activity on 2024/12/18 22:35
upstream KCSAN: data-race in blk_mq_start_request / bt_for_each block 6 1 586d 586d 0/29 auto-obsoleted due to no activity on 2024/03/02 18:09

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blk_mq_start_request / bt_for_each

write to 0xffff888102469b78 of 8 bytes by task 7077 on cpu 0:
 blk_mq_start_request+0x1e1/0x3d0 block/blk-mq.c:1359
 loop_queue_rq+0x43/0x680 drivers/block/loop.c:1856
 __blk_mq_issue_directly block/blk-mq.c:2695 [inline]
 blk_mq_request_issue_directly+0x1e6/0x380 block/blk-mq.c:2782
 blk_mq_issue_direct+0x19d/0x530 block/blk-mq.c:2803
 blk_mq_dispatch_queue_requests+0x1fc/0x350 block/blk-mq.c:2878
 blk_mq_flush_plug_list+0x2b6/0x330 block/blk-mq.c:2961
 __blk_flush_plug+0x222/0x2a0 block/blk-core.c:1220
 blk_finish_plug block/blk-core.c:1247 [inline]
 __submit_bio+0x2fc/0x4d0 block/blk-core.c:649
 __submit_bio_noacct_mq block/blk-core.c:722 [inline]
 submit_bio_noacct_nocheck+0x208/0x6a0 block/blk-core.c:751
 submit_bio_noacct+0x6ed/0x920 block/blk-core.c:874
 submit_bio+0x2a6/0x2c0 block/blk-core.c:916
 submit_bh_wbc+0x2e0/0x320 fs/buffer.c:2824
 submit_bh fs/buffer.c:2829 [inline]
 __sync_dirty_buffer+0x16b/0x230 fs/buffer.c:2867
 sync_dirty_buffer+0x1a/0x30 fs/buffer.c:2880
 ext4_update_primary_sb fs/ext4/ioctl.c:88 [inline]
 ext4_update_superblocks_fn+0x307/0xaa0 fs/ext4/ioctl.c:218
 ext4_update_overhead+0x135/0x160 fs/ext4/ioctl.c:1721
 ext4_fill_super+0x2e05/0x35d0 fs/ext4/super.c:5749
 get_tree_bdev_flags+0x28e/0x300 fs/super.c:1692
 get_tree_bdev+0x1f/0x30 fs/super.c:1715
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5760
 vfs_get_tree+0x57/0x1d0 fs/super.c:1815
 do_new_mount+0x207/0x5e0 fs/namespace.c:3808
 path_mount+0x4a4/0xb20 fs/namespace.c:4123
 do_mount fs/namespace.c:4136 [inline]
 __do_sys_mount fs/namespace.c:4347 [inline]
 __se_sys_mount+0x28f/0x2e0 fs/namespace.c:4324
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4324
 x64_sys_call+0x2b4d/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888102469b78 of 8 bytes by task 47 on cpu 1:
 blk_mq_find_and_get_req block/blk-mq-tag.c:259 [inline]
 bt_iter block/blk-mq-tag.c:287 [inline]
 __sbitmap_for_each_set include/linux/sbitmap.h:269 [inline]
 sbitmap_for_each_set include/linux/sbitmap.h:290 [inline]
 bt_for_each+0x274/0x470 block/blk-mq-tag.c:324
 blk_mq_queue_tag_busy_iter+0x1ba/0x330 block/blk-mq-tag.c:533
 blk_mq_timeout_work+0xc2/0x340 block/blk-mq.c:1734
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x486/0x510 kernel/kthread.c:463
 ret_from_fork+0xda/0x150 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0xffff888101245400 -> 0xffff88810252a680

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 47 Comm: kworker/1:1H Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: kblockd blk_mq_timeout_work
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/04 17:13 upstream 08b06c30a445 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_start_request / bt_for_each
* Struck through repros no longer work on HEAD.