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: 1d10h, last: 1d10h

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

read to 0xffff888101ff887c of 4 bytes by task 3456 on cpu 0:
 bdev_can_atomic_write include/linux/blkdev.h:1763 [inline]
 blkdev_open+0x161/0x290 block/fops.c:649
 do_dentry_open+0x646/0xa20 fs/open.c:956
 vfs_open+0x37/0x1e0 fs/open.c:1086
 do_open fs/namei.c:3880 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4039
 do_filp_open+0x109/0x230 fs/namei.c:4066
 do_sys_openat2+0xa6/0x110 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_openat fs/open.c:1460 [inline]
 __se_sys_openat fs/open.c:1455 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1455
 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+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888101ff87f8 of 176 bytes by task 5034 on cpu 1:
 queue_limits_commit_update+0x4c/0x110 block/blk-settings.c:461
 loop_configure+0x746/0x9f0 drivers/block/loop.c:1029
 lo_ioctl+0x5f8/0x1560 drivers/block/loop.c:-1
 blkdev_ioctl+0x34f/0x440 block/ioctl.c:704
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:892
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:892
 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+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5034 Comm: syz.2.635 Not tainted 6.15.0-rc4-syzkaller-00296-ge8ab83e34bdc #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================
loop2: detected capacity change from 0 to 128
FAT-fs (loop2): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
FAT-fs (loop2): Invalid FSINFO signature: 0x41615252, 0x80417272 (sector = 1)
batman_adv: batadv0: Adding interface: dummy0
batman_adv: batadv0: The MTU of interface dummy0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Interface activated: dummy0

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