syzbot


KCSAN: data-race in blkdev_open / queue_limits_commit_update

Status: moderation: reported on 2025/05/04 12:21
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+81f06fc24f9a9b5621b6@syzkaller.appspotmail.com
First crash: 46d, last: 9h45m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blkdev_open / queue_limits_commit_update

read to 0xffff8881023d101c of 4 bytes by task 3387 on cpu 1:
 bdev_can_atomic_write include/linux/blkdev.h:1784 [inline]
 blkdev_open+0x161/0x290 block/fops.c:673
 do_dentry_open+0x646/0xa20 fs/open.c:964
 vfs_open+0x37/0x1e0 fs/open.c:1094
 do_open fs/namei.c:3896 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4055
 do_filp_open+0x109/0x230 fs/namei.c:4082
 do_sys_openat2+0xa6/0x110 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_openat fs/open.c:1468 [inline]
 __se_sys_openat fs/open.c:1463 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1463
 x64_sys_call+0x1af/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:258
 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

write to 0xffff8881023d0f98 of 184 bytes by task 3893 on cpu 0:
 queue_limits_commit_update+0x4c/0x110 block/blk-settings.c:456
 loop_configure+0x79c/0xa50 drivers/block/loop.c:1053
 lo_ioctl+0x559/0x15d0 drivers/block/loop.c:-1
 blkdev_ioctl+0x352/0x440 block/ioctl.c:704
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x19a8/0x2fb0 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3893 Comm: syz.4.75 Not tainted 6.16.0-rc2-syzkaller-00087-g24770983ccfe #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================
loop4: detected capacity change from 0 to 512
EXT4-fs: Quota format mount options ignored when QUOTA feature is enabled
EXT4-fs (loop4): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
ext4 filesystem being mounted at /11/bus supports timestamps until 2038-01-19 (0x7fffffff)

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/19 23:38 upstream 24770983ccfe ed3e87f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
2025/05/31 00:50 upstream 8477ab143069 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
2025/05/25 02:33 upstream b1427432d3b6 ed351ea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
2025/05/15 14:21 upstream c94d59a126cb d6b2ee52 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
2025/05/09 22:30 upstream 9c69f8884904 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
2025/05/04 12:21 upstream e8ab83e34bdc b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blkdev_open / queue_limits_commit_update
* Struck through repros no longer work on HEAD.