================================================================== BUG: KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write read-write to 0xffff88810a823e70 of 8 bytes by task 7457 on cpu 1: __filemap_add_folio+0x385/0x730 mm/filemap.c:907 filemap_add_folio+0x6f/0x150 mm/filemap.c:942 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250 do_page_cache_ra mm/readahead.c:299 [inline] page_cache_ra_order mm/readahead.c:559 [inline] ondemand_readahead+0x550/0x6c0 mm/readahead.c:681 page_cache_async_ra+0x9d/0xb0 mm/readahead.c:730 do_async_mmap_readahead mm/filemap.c:3233 [inline] filemap_fault+0x38a/0xb70 mm/filemap.c:3287 __do_fault mm/memory.c:4198 [inline] do_shared_fault mm/memory.c:4602 [inline] do_fault mm/memory.c:4674 [inline] do_pte_missing mm/memory.c:3664 [inline] handle_pte_fault mm/memory.c:4939 [inline] __handle_mm_fault mm/memory.c:5079 [inline] handle_mm_fault+0x131b/0x2c10 mm/memory.c:5233 do_user_addr_fault arch/x86/mm/fault.c:1392 [inline] handle_page_fault arch/x86/mm/fault.c:1486 [inline] exc_page_fault+0x24d/0x650 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 rep_movs_alternative+0x4a/0xb0 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:133 [inline] _copy_to_user+0x77/0x90 lib/usercopy.c:41 copy_to_user include/linux/uaccess.h:191 [inline] pagemap_read+0x3a9/0x5b0 fs/proc/task_mmu.c:1728 vfs_read+0x19f/0x5c0 fs/read_write.c:468 ksys_pread64 fs/read_write.c:665 [inline] __do_sys_pread64 fs/read_write.c:675 [inline] __se_sys_pread64 fs/read_write.c:672 [inline] __x64_sys_pread64+0xf7/0x150 fs/read_write.c:672 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 0xffff88810a823e70 of 8 bytes by task 7477 on cpu 0: kiocb_invalidate_post_direct_write+0x61/0x1b0 mm/filemap.c:3823 iomap_dio_complete+0x334/0x4c0 fs/iomap/direct-io.c:111 iomap_dio_rw+0x62/0x90 fs/iomap/direct-io.c:669 ext4_dio_write_iter fs/ext4/file.c:609 [inline] ext4_file_write_iter+0xab3/0x1230 fs/ext4/file.c:720 do_iter_write+0x4b4/0x7b0 fs/read_write.c:860 vfs_iter_write+0x56/0x70 fs/read_write.c:901 iter_file_splice_write+0x462/0x7e0 fs/splice.c:739 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x8a/0xb0 fs/splice.c:1145 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1091 do_splice_direct+0x10d/0x190 fs/splice.c:1197 do_sendfile+0x3b6/0x9a0 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308 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: 0x0000000000000610 -> 0x0000000000000615 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 7477 Comm: syz-executor.3 Tainted: G W 6.5.0-rc7-syzkaller-00104-g4f9e7fabf864 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================