================================================================== BUG: KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write read-write to 0xffff88810a5ea6f0 of 8 bytes by task 13746 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_sync_ra+0x284/0x2a0 mm/readahead.c:708 page_cache_sync_readahead include/linux/pagemap.h:1213 [inline] filemap_get_pages+0x254/0xea0 mm/filemap.c:2563 filemap_splice_read+0x23a/0x810 mm/filemap.c:2925 vfs_splice_read fs/splice.c:996 [inline] splice_direct_to_actor+0x28c/0x690 fs/splice.c:1072 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 read to 0xffff88810a5ea6f0 of 8 bytes by task 13766 on cpu 0: kiocb_invalidate_post_direct_write+0x61/0x1b0 mm/filemap.c:3823 generic_file_direct_write+0xf2/0x200 mm/filemap.c:3871 __generic_file_write_iter+0xae/0x120 mm/filemap.c:4004 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4044 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: 0x0000000000000017 -> 0x0000000000000018 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 13766 Comm: syz-executor.5 Not tainted 6.5.0-rc6-syzkaller-00027-g91aa6c412d7f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ================================================================== syz-executor.5: attempt to access beyond end of device loop5: rw=34817, sector=2048, nr_sectors = 2 limit=2048