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: 45d, last: 18d

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

read to 0xffff88810235c0fc of 4 bytes by task 3553 on cpu 1:
 bdev_can_atomic_write include/linux/blkdev.h:1777 [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:3887 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4046
 do_filp_open+0x109/0x230 fs/namei.c:4073
 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 0xffff88810235c078 of 184 bytes by task 3315 on cpu 0:
 queue_limits_commit_update+0x4c/0x110 block/blk-settings.c:456
 __loop_clr_fd drivers/block/loop.c:1126 [inline]
 lo_release+0x1e9/0x400 drivers/block/loop.c:1716
 bdev_release+0x373/0x3d0 block/bdev.c:-1
 blkdev_release+0x15/0x20 block/fops.c:684
 __fput+0x29b/0x650 fs/file_table.c:465
 fput_close_sync+0x6e/0x120 fs/file_table.c:570
 __do_sys_close fs/open.c:1589 [inline]
 __se_sys_close fs/open.c:1574 [inline]
 __x64_sys_close+0x56/0xf0 fs/open.c:1574
 x64_sys_call+0x2747/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:4
 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: 3315 Comm: syz-executor Not tainted 6.15.0-syzkaller-09113-g8477ab143069 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

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