loop7: detected capacity change from 0 to 8192 ================================================================== BUG: KCSAN: data-race in fat12_ent_put / fat_mirror_bhs read-write to 0xffff888124883636 of 1 bytes by task 8074 on cpu 0: fat12_ent_put+0xc4/0x170 fs/fat/fatent.c:165 fat_alloc_clusters+0x4ce/0xa80 fs/fat/fatent.c:503 fat_add_cluster fs/fat/inode.c:107 [inline] __fat_get_block fs/fat/inode.c:154 [inline] fat_get_block+0x258/0x5e0 fs/fat/inode.c:189 __block_write_begin_int+0x419/0xf70 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x5a3/0x8e0 fs/buffer.c:2601 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228 cont_expand_zero fs/buffer.c:2528 [inline] cont_write_begin+0x198/0x8e0 fs/buffer.c:2591 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228 generic_cont_expand_simple+0xad/0x150 fs/buffer.c:2492 fat_cont_expand+0x3e/0x170 fs/fat/file.c:223 fat_setattr+0x2a5/0x8a0 fs/fat/file.c:513 notify_change+0x806/0x890 fs/attr.c:552 do_truncate fs/open.c:65 [inline] do_ftruncate+0x327/0x430 fs/open.c:192 do_sys_ftruncate fs/open.c:207 [inline] __do_sys_ftruncate fs/open.c:212 [inline] __se_sys_ftruncate fs/open.c:210 [inline] __x64_sys_ftruncate+0x68/0xc0 fs/open.c:210 x64_sys_call+0xd65/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:78 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 read to 0xffff888124883600 of 512 bytes by task 8068 on cpu 1: fat_mirror_bhs+0x1df/0x320 fs/fat/fatent.c:395 fat_ent_write+0xd0/0xe0 fs/fat/fatent.c:423 fat_chain_add+0x15b/0x3f0 fs/fat/misc.c:136 fat_add_cluster fs/fat/inode.c:112 [inline] __fat_get_block fs/fat/inode.c:154 [inline] fat_get_block+0x46c/0x5e0 fs/fat/inode.c:189 __block_write_begin_int+0x419/0xf70 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x5a3/0x8e0 fs/buffer.c:2601 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228 cont_expand_zero fs/buffer.c:2528 [inline] cont_write_begin+0x198/0x8e0 fs/buffer.c:2591 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228 generic_cont_expand_simple+0xad/0x150 fs/buffer.c:2492 fat_cont_expand+0x3e/0x170 fs/fat/file.c:223 fat_fallocate+0x177/0x1c0 fs/fat/file.c:301 vfs_fallocate+0x410/0x450 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0x7a/0xd0 fs/open.c:365 x64_sys_call+0x2b88/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:286 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: 8068 Comm: syz.7.1444 Not tainted 6.15.0-rc5-syzkaller-00032-g0d8d44db295c #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 ================================================================== FAT-fs (loop7): error, clusters badly computed (690 != 688) FAT-fs (loop7): error, clusters badly computed (697 != 689) FAT-fs (loop7): error, clusters badly computed (702 != 690) FAT-fs (loop7): error, clusters badly computed (708 != 691) FAT-fs (loop7): error, clusters badly computed (711 != 692) FAT-fs (loop7): error, clusters badly computed (713 != 693) FAT-fs (loop7): error, clusters badly computed (715 != 694) FAT-fs (loop7): error, clusters badly computed (717 != 695) FAT-fs (loop7): error, clusters badly computed (718 != 696) FAT-fs (loop7): error, clusters badly computed (720 != 697) FAT-fs (loop7): error, clusters badly computed (721 != 698) FAT-fs (loop7): error, fat_bmap_cluster: request beyond EOF (i_pos 2074)