================================================================== BUG: KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range read-write to 0xffff888138f8d0a8 of 8 bytes by task 27893 on cpu 0: __filemap_add_folio+0x4c1/0x730 mm/filemap.c:902 filemap_add_folio+0x70/0x160 mm/filemap.c:937 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:3178 [inline] filemap_fault+0x3da/0xc30 mm/filemap.c:3232 __do_fault mm/memory.c:4266 [inline] do_read_fault mm/memory.c:4629 [inline] do_fault mm/memory.c:4763 [inline] do_pte_missing mm/memory.c:3731 [inline] handle_pte_fault mm/memory.c:5039 [inline] __handle_mm_fault mm/memory.c:5180 [inline] handle_mm_fault+0x13bd/0x2dd0 mm/memory.c:5345 faultin_page mm/gup.c:956 [inline] __get_user_pages+0x402/0xe40 mm/gup.c:1239 populate_vma_page_range mm/gup.c:1677 [inline] __mm_populate+0x216/0x330 mm/gup.c:1786 mm_populate include/linux/mm.h:3379 [inline] vm_mmap_pgoff+0x1a7/0x240 mm/util.c:561 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1425 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff888138f8d0a8 of 8 bytes by task 27879 on cpu 1: mapping_needs_writeback mm/filemap.c:625 [inline] file_write_and_wait_range+0x67/0x190 mm/filemap.c:777 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:2653 [inline] ext4_buffered_write_iter+0x334/0x370 fs/ext4/file.c:305 ext4_file_write_iter+0x297/0xe10 do_iter_write+0x4ad/0x770 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+0x3c4/0x980 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:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x0000000000000620 -> 0x0000000000000623 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 27879 Comm: syz-executor.4 Not tainted 6.7.0-rc8-syzkaller-00174-g95c8a35f1c01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 ==================================================================