syzbot


KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore (2)

Status: moderation: reported on 2025/09/04 01:43
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+48726f682fe776e69b74@syzkaller.appspotmail.com
First crash: 114d, last: 9d13h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore block 6 1 265d 265d 0/29 auto-obsoleted due to no activity on 2025/06/01 08:09

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore

read-write to 0xffff8881021146f4 of 4 bytes by task 7097 on cpu 1:
 __blk_mq_unfreeze_queue block/blk-mq.c:218 [inline]
 blk_mq_unfreeze_queue_nomemrestore+0x38/0xc0 block/blk-mq.c:232
 blk_mq_unfreeze_queue include/linux/blk-mq.h:960 [inline]
 loop_set_status+0x3a3/0x6a0 drivers/block/loop.c:1267
 loop_set_status64 drivers/block/loop.c:1373 [inline]
 lo_ioctl+0x671/0x12b0 drivers/block/loop.c:1559
 blkdev_ioctl+0x37d/0x460 block/ioctl.c:791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x14b0/0x3000 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd8/0x2c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881021146f4 of 4 bytes by task 7100 on cpu 0:
 __bio_queue_enter+0x1e5/0x5a0 block/blk-core.c:353
 bio_queue_enter block/blk.h:93 [inline]
 blk_mq_submit_bio+0x196/0x1120 block/blk-mq.c:3164
 __submit_bio+0xed/0x4d0 block/blk-core.c:637
 __submit_bio_noacct_mq block/blk-core.c:724 [inline]
 submit_bio_noacct_nocheck+0x152/0x5c0 block/blk-core.c:755
 submit_bio_noacct+0x746/0x9a0 block/blk-core.c:879
 submit_bio+0x2a6/0x2c0 block/blk-core.c:921
 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
 fat_mirror_bhs+0x270/0x320 fs/fat/fatent.c:400
 fat_ent_write+0xd0/0xe0 fs/fat/fatent.c:423
 fat_chain_add+0x15d/0x440 fs/fat/misc.c:136
 fat_add_cluster fs/fat/inode.c:113 [inline]
 __fat_get_block fs/fat/inode.c:155 [inline]
 fat_get_block+0x46c/0x5e0 fs/fat/inode.c:190
 __block_write_begin_int+0x400/0xf90 fs/buffer.c:2145
 block_write_begin fs/buffer.c:2256 [inline]
 cont_write_begin+0x5ff/0x970 fs/buffer.c:2594
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:230
 generic_perform_write+0x184/0x490 mm/filemap.c:4314
 __generic_file_write_iter+0x9e/0x120 mm/filemap.c:4431
 generic_file_write_iter+0x8d/0x2f0 mm/filemap.c:4457
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x52a/0x960 fs/read_write.c:686
 ksys_write+0xda/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2847/0x3000 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd8/0x2c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 7100 Comm: syz.1.1076 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================
Buffer I/O error on dev loop1, logical block 1, lost sync page write
FAT-fs (loop1): unable to read inode block for updating (i_pos 2070)
Buffer I/O error on dev loop1, logical block 185, lost async page write
Buffer I/O error on dev loop1, logical block 186, lost async page write
Buffer I/O error on dev loop1, logical block 187, lost async page write
Buffer I/O error on dev loop1, logical block 188, lost async page write
Buffer I/O error on dev loop1, logical block 189, lost async page write
Buffer I/O error on dev loop1, logical block 190, lost async page write
Buffer I/O error on dev loop1, logical block 191, lost async page write
Buffer I/O error on dev loop1, logical block 193, lost async page write

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/18 04:38 upstream ea1013c15392 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore
2025/11/24 22:01 upstream ac3fd01e4c1e bf6fe8fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore
2025/10/03 00:33 upstream 7f7072574127 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore
2025/09/05 03:28 upstream 08b06c30a445 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore
2025/09/04 01:42 upstream ec299e4dc21e 96a211bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue_nomemrestore
* Struck through repros no longer work on HEAD.