loop5: rw=2049, sector=3816, nr_sectors = 3488 limit=256 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=7304, nr_sectors = 3696 limit=256 ================================================================== BUG: KCSAN: data-race in __mpage_writepage / generic_write_end write to 0xffff888106618a00 of 8 bytes by task 16663 on cpu 1: i_size_write include/linux/fs.h:932 [inline] generic_write_end+0x94/0x230 fs/buffer.c:2280 fat_write_end+0x4e/0x160 fs/fat/inode.c:244 cont_expand_zero fs/buffer.c:2505 [inline] cont_write_begin+0x2c0/0x690 fs/buffer.c:2563 fat_write_begin+0x61/0xf0 fs/fat/inode.c:230 generic_cont_expand_simple+0xa7/0x140 fs/buffer.c:2464 fat_cont_expand+0x3a/0x160 fs/fat/file.c:223 fat_setattr+0x2a9/0x840 fs/fat/file.c:513 notify_change+0x866/0x8e0 fs/attr.c:499 do_truncate+0x116/0x150 fs/open.c:66 do_sys_ftruncate+0x2ba/0x3b0 fs/open.c:194 __do_sys_ftruncate fs/open.c:205 [inline] __se_sys_ftruncate fs/open.c:203 [inline] __x64_sys_ftruncate+0x33/0x40 fs/open.c:203 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888106618a00 of 8 bytes by task 16660 on cpu 0: i_size_read include/linux/fs.h:910 [inline] __mpage_writepage+0xc0/0xd90 fs/mpage.c:489 write_cache_pages+0x38d/0x740 mm/page-writeback.c:2474 mpage_writepages+0x72/0xe0 fs/mpage.c:679 fat_writepages+0x24/0x30 fs/fat/inode.c:200 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] __filemap_fdatawrite mm/filemap.c:429 [inline] filemap_fdatawrite+0x9d/0xc0 mm/filemap.c:434 writeback_inode fs/fat/inode.c:1914 [inline] fat_flush_inodes+0xcc/0x150 fs/fat/inode.c:1932 fat_file_release+0x9b/0xc0 fs/fat/file.c:179 __fput+0x2fd/0x5f0 fs/file_table.c:384 __fput_sync+0x44/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close+0xfa/0x1a0 fs/open.c:1557 __x64_sys_close+0x1f/0x30 fs/open.c:1557 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000008c1000 -> 0x00000000008c2000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 16660 Comm: syz-executor.5 Not tainted 6.6.0-rc1-syzkaller-00196-g57d88e8a5974 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 ================================================================== syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=11000, nr_sectors = 3280 limit=256 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=18472, nr_sectors = 720 limit=256 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=19272, nr_sectors = 152 limit=256