================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range read-write to 0xffff8881081159c8 of 8 bytes by task 6920 on cpu 0: page_cache_delete mm/filemap.c:154 [inline] __filemap_remove_folio+0x1c5/0x2c0 mm/filemap.c:232 invalidate_complete_folio2 mm/truncate.c:575 [inline] invalidate_inode_pages2_range+0x3f8/0x720 mm/truncate.c:662 kiocb_invalidate_pages+0x1b1/0x1e0 mm/filemap.c:2714 __iomap_dio_rw+0x585/0x1090 fs/iomap/direct-io.c:639 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:749 ext4_dio_write_iter fs/ext4/file.c:577 [inline] ext4_file_write_iter+0xaa4/0xe30 fs/ext4/file.c:696 call_write_iter include/linux/fs.h:2110 [inline] iter_file_splice_write+0x5e6/0x970 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0xd7/0x150 fs/splice.c:1233 do_sendfile+0x3b9/0x970 fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64 fs/read_write.c:1348 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348 x64_sys_call+0x2c67/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:41 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881081159c8 of 8 bytes by task 6927 on cpu 1: mapping_needs_writeback mm/filemap.c:635 [inline] filemap_write_and_wait_range+0x58/0x1f0 mm/filemap.c:684 kiocb_write_and_wait+0x79/0x110 mm/filemap.c:2687 __iomap_dio_rw+0x4d9/0x1090 fs/iomap/direct-io.c:593 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:749 ext4_dio_read_iter fs/ext4/file.c:94 [inline] ext4_file_read_iter+0x220/0x2a0 fs/ext4/file.c:145 call_read_iter include/linux/fs.h:2104 [inline] copy_splice_read+0x3a4/0x5d0 fs/splice.c:365 do_splice_read fs/splice.c:984 [inline] splice_direct_to_actor+0x28e/0x670 fs/splice.c:1089 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0xd7/0x150 fs/splice.c:1233 do_sendfile+0x3b9/0x970 fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64 fs/read_write.c:1348 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348 x64_sys_call+0x2c67/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:41 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x0000000000000020 -> 0x0000000000000015 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6927 Comm: syz-executor.4 Tainted: G W 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================