syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=1800, nr_sectors = 2048 limit=256 syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=3848, nr_sectors = 3592 limit=256 ================================================================== BUG: KCSAN: data-race in __mpage_writepage / generic_write_end write to 0xffff888107b89f38 of 8 bytes by task 22452 on cpu 1: i_size_write include/linux/fs.h:932 [inline] generic_write_end+0x94/0x230 fs/buffer.c:2275 fat_write_end+0x4e/0x160 fs/fat/inode.c:244 generic_perform_write+0x267/0x410 mm/filemap.c:3939 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4023 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4049 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x430/0x6b0 fs/read_write.c:590 ksys_write+0xeb/0x1a0 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:652 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff888107b89f38 of 8 bytes by task 22469 on cpu 0: i_size_read include/linux/fs.h:910 [inline] __mpage_writepage+0xa6/0xdc0 fs/mpage.c:478 write_cache_pages+0x38d/0x740 mm/page-writeback.c:2474 mpage_writepages+0x72/0xe0 fs/mpage.c:672 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:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] file_write_and_wait_range+0xf4/0x190 mm/filemap.c:779 __generic_file_fsync+0x4c/0x140 fs/libfs.c:1448 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191 vfs_fsync_range fs/sync.c:188 [inline] vfs_fsync fs/sync.c:202 [inline] do_fsync fs/sync.c:212 [inline] __do_sys_fdatasync fs/sync.c:225 [inline] __se_sys_fdatasync fs/sync.c:223 [inline] __x64_sys_fdatasync+0x84/0xd0 fs/sync.c:223 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x000000000084f000 -> 0x0000000000850000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 22469 Comm: syz-executor.1 Tainted: G W 6.7.0-syzkaller-02723-gde927f6c0b07 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 ================================================================== syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=7440, nr_sectors = 2376 limit=256