syzbot


KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_dispatch_rq_list (3)

Status: moderation: reported on 2025/01/04 03:47
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+d27c8cc9338dfe5e6b38@syzkaller.appspotmail.com
First crash: 11d, last: 11d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_dispatch_rq_list block 1 1313d 1313d 0/28 auto-closed as invalid on 2021/07/16 10:39
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_dispatch_rq_list (2) block 52 297d 403d 0/28 auto-obsoleted due to no activity on 2024/04/27 12:39

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_dispatch_rq_list

write to 0xffff8881023cc4f8 of 4 bytes by task 25 on cpu 1:
 blk_mq_dispatch_rq_list+0xd99/0xfa0
 __blk_mq_sched_dispatch_requests+0x1ce/0xd50 block/blk-mq-sched.c:301
 blk_mq_sched_dispatch_requests+0x88/0x120 block/blk-mq-sched.c:331
 blk_mq_run_hw_queue+0x18a/0x230 block/blk-mq.c:2352
 blk_mq_run_hw_queues+0x1ac/0x240 block/blk-mq.c:2401
 blk_mq_requeue_work+0x3a5/0x3d0 block/blk-mq.c:1566
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 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 0xffff8881023cc4f8 of 4 bytes by task 19542 on cpu 0:
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:97 [inline]
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:184 [inline]
 __blk_mq_sched_dispatch_requests+0x28b/0xd50 block/blk-mq-sched.c:309
 blk_mq_sched_dispatch_requests+0x88/0x120 block/blk-mq-sched.c:331
 blk_mq_run_hw_queue+0x18a/0x230 block/blk-mq.c:2352
 blk_mq_flush_plug_list+0xbd5/0xef0 block/blk-mq.c:2913
 __blk_flush_plug+0x216/0x290 block/blk-core.c:1213
 blk_finish_plug+0x48/0x70 block/blk-core.c:1240
 ext4_do_writepages+0x1bec/0x2130 fs/ext4/inode.c:2786
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2702
 filemap_fdatawrite_wbc mm/filemap.c:397 [inline]
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 file_write_and_wait_range+0x168/0x2f0 mm/filemap.c:787
 ext4_sync_file+0x12e/0x6c0 fs/ext4/fsync.c:158
 vfs_fsync_range+0x116/0x130 fs/sync.c:187
 __do_sys_msync mm/msync.c:96 [inline]
 __se_sys_msync+0x34d/0x510 mm/msync.c:32
 __x64_sys_msync+0x43/0x50 mm/msync.c:32
 x64_sys_call+0x112e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:27
 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: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 19542 Comm: syz.4.14686 Not tainted 6.13.0-rc5-syzkaller-00161-g63676eefb7a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/04 03:47 upstream 63676eefb7a0 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_dispatch_rq_list
* Struck through repros no longer work on HEAD.