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: 102d, last: 20d
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 253d 253d 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 0xffff888102280704 of 4 bytes by task 9764 on cpu 0:
 __blk_mq_unfreeze_queue block/blk-mq.c:217 [inline]
 blk_mq_unfreeze_queue_nomemrestore+0x38/0xc0 block/blk-mq.c:231
 blk_mq_unfreeze_queue include/linux/blk-mq.h:944 [inline]
 loop_set_status+0x3a3/0x6a0 drivers/block/loop.c:1268
 loop_set_status64 drivers/block/loop.c:1374 [inline]
 lo_ioctl+0x671/0x12b0 drivers/block/loop.c:1560
 blkdev_ioctl+0x356/0x440 block/ioctl.c:705
 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+0x1816/0x3000 arch/x86/include/generated/asm/syscalls_64.h:17
 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 0xffff888102280704 of 4 bytes by task 3305 on cpu 1:
 __bio_queue_enter+0x1e5/0x5a0 block/blk-core.c:353
 bio_queue_enter block/blk.h:94 [inline]
 blk_mq_submit_bio+0x196/0x1100 block/blk-mq.c:3153
 __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
 mpage_bio_submit_read fs/mpage.c:75 [inline]
 mpage_readahead+0x267/0x2b0 fs/mpage.c:380
 blkdev_readahead+0x1c/0x30 block/fops.c:504
 read_pages+0xa3/0x480 mm/readahead.c:163
 page_cache_ra_unbounded+0x34e/0x450 mm/readahead.c:302
 do_page_cache_ra mm/readahead.c:332 [inline]
 force_page_cache_ra mm/readahead.c:361 [inline]
 page_cache_sync_ra+0x26e/0x6a0 mm/readahead.c:579
 filemap_get_pages+0x2d0/0x11b0 mm/filemap.c:2638
 filemap_read+0x231/0xa00 mm/filemap.c:2748
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:859
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x64c/0x770 fs/read_write.c:572
 ksys_read+0xda/0x1a0 fs/read_write.c:715
 __do_sys_read fs/read_write.c:724 [inline]
 __se_sys_read fs/read_write.c:722 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:722
 x64_sys_call+0x27c0/0x3000 arch/x86/include/generated/asm/syscalls_64.h:1
 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

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3305 Comm: udevd Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.