syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=1736, nr_sectors = 2400 limit=256 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=4136, nr_sectors = 2312 limit=256 ================================================================== BUG: KCSAN: data-race in __mpage_writepage / generic_write_end write to 0xffff8881084dae60 of 8 bytes by task 11927 on cpu 1: i_size_write include/linux/fs.h:901 [inline] generic_write_end+0x9f/0x240 fs/buffer.c:2304 fat_write_end+0x4e/0x160 fs/fat/inode.c:244 cont_expand_zero fs/buffer.c:2529 [inline] cont_write_begin+0x2d4/0x6f0 fs/buffer.c:2587 fat_write_begin+0x61/0xf0 fs/fat/inode.c:230 generic_cont_expand_simple+0xad/0x140 fs/buffer.c:2488 fat_cont_expand+0x3a/0x160 fs/fat/file.c:223 fat_setattr+0x2a9/0x840 fs/fat/file.c:513 notify_change+0x8c3/0x930 fs/attr.c:483 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 0xffff8881084dae60 of 8 bytes by task 11954 on cpu 0: i_size_read include/linux/fs.h:879 [inline] __mpage_writepage+0xc3/0xdb0 fs/mpage.c:489 write_cache_pages+0x39d/0x750 mm/page-writeback.c:2474 mpage_writepages+0x72/0xe0 fs/mpage.c:679 fat_writepages+0x24/0x30 fs/fat/inode.c:200 do_writepages+0x1c5/0x340 mm/page-writeback.c:2553 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:393 __filemap_fdatawrite_range+0xa1/0xd0 mm/filemap.c:426 sync_file_range+0x1b3/0x220 fs/sync.c:292 ksys_sync_file_range fs/sync.c:364 [inline] __do_sys_sync_file_range fs/sync.c:373 [inline] __se_sys_sync_file_range fs/sync.c:370 [inline] __x64_sys_sync_file_range+0x80/0xd0 fs/sync.c:370 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: 0x0000000000bc9000 -> 0x0000000000bcc000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 11954 Comm: syz-executor.5 Not tainted 6.5.0-rc4-syzkaller-00051-g7bafbd4027ae #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 ================================================================== syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=6448, nr_sectors = 5432 limit=256