================================================================== BUG: KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range read-write to 0xffff888105d46c08 of 8 bytes by task 8582 on cpu 0: __filemap_add_folio+0x3c3/0x750 mm/filemap.c:904 filemap_add_folio+0x70/0x160 mm/filemap.c:939 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:546 [inline] ondemand_readahead+0x524/0x690 mm/readahead.c:668 page_cache_async_ra+0x94/0xa0 mm/readahead.c:717 do_async_mmap_readahead mm/filemap.c:3227 [inline] filemap_fault+0x3a0/0xbf0 mm/filemap.c:3281 __do_fault mm/memory.c:4204 [inline] do_shared_fault mm/memory.c:4635 [inline] do_fault mm/memory.c:4709 [inline] do_pte_missing mm/memory.c:3669 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x170f/0x2cc0 mm/memory.c:5284 faultin_page mm/gup.c:956 [inline] __get_user_pages+0x402/0xe40 mm/gup.c:1239 __get_user_pages_locked mm/gup.c:1504 [inline] __gup_longterm_locked+0x1147/0x13c0 mm/gup.c:2198 pin_user_pages_remote+0x114/0x170 mm/gup.c:3346 process_vm_rw_single_vec mm/process_vm_access.c:105 [inline] process_vm_rw_core mm/process_vm_access.c:215 [inline] process_vm_rw+0x4f4/0x8c0 mm/process_vm_access.c:283 __do_sys_process_vm_writev mm/process_vm_access.c:303 [inline] __se_sys_process_vm_writev mm/process_vm_access.c:298 [inline] __x64_sys_process_vm_writev+0x7a/0x90 mm/process_vm_access.c:298 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 0xffff888105d46c08 of 8 bytes by task 8569 on cpu 1: mapping_needs_writeback mm/filemap.c:628 [inline] file_write_and_wait_range+0x67/0x190 mm/filemap.c:780 ext4_sync_file+0x133/0x6c0 fs/ext4/fsync.c:158 vfs_fsync_range+0x111/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2584 [inline] ext4_buffered_write_iter+0x334/0x370 fs/ext4/file.c:305 ext4_file_write_iter+0xd6/0x1200 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:736 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0x8a/0xb0 fs/splice.c:1142 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088 do_splice_direct+0x10d/0x190 fs/splice.c:1194 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: 0x00000000000006b6 -> 0x00000000000006bd Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 8569 Comm: syz-executor.3 Not tainted 6.6.0-rc7-syzkaller-00012-ge017769f4ce2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 ==================================================================