================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range read-write to 0xffff88810ad92e40 of 8 bytes by task 10757 on cpu 0: page_cache_delete mm/filemap.c:145 [inline] __filemap_remove_folio+0x216/0x2f0 mm/filemap.c:223 __remove_mapping+0x35c/0x480 mm/vmscan.c:1379 shrink_folio_list+0x11d4/0x1e90 mm/vmscan.c:2016 shrink_inactive_list+0x433/0x740 mm/vmscan.c:2489 shrink_list mm/vmscan.c:2716 [inline] shrink_lruvec+0x3aa/0x700 mm/vmscan.c:5885 shrink_node_memcgs+0x253/0x470 mm/vmscan.c:6074 shrink_node+0x1d7/0x930 mm/vmscan.c:6105 shrink_zones+0x2c1/0x5d0 mm/vmscan.c:6343 do_try_to_free_pages+0x195/0x760 mm/vmscan.c:6405 try_to_free_mem_cgroup_pages+0x1d1/0x420 mm/vmscan.c:6720 try_charge_memcg+0x2cc/0x9c0 mm/memcontrol.c:2681 try_charge mm/memcontrol.c:2823 [inline] mem_cgroup_charge_skmem+0x4d/0x130 mm/memcontrol.c:7209 sock_reserve_memory+0xb0/0x3a0 net/core/sock.c:1018 sk_setsockopt+0xf7f/0x1cc0 net/core/sock.c:1518 sock_setsockopt+0x38/0x50 net/core/sock.c:1542 __sys_setsockopt+0x242/0x2b0 net/socket.c:2248 __do_sys_setsockopt net/socket.c:2263 [inline] __se_sys_setsockopt net/socket.c:2260 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2260 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88810ad92e40 of 8 bytes by task 10756 on cpu 1: mapping_needs_writeback mm/filemap.c:627 [inline] file_write_and_wait_range+0x4b/0x170 mm/filemap.c:773 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151 vfs_fsync_range+0x107/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2883 [inline] iomap_dio_complete+0x3e7/0x460 fs/iomap/direct-io.c:128 iomap_dio_rw+0x5e/0x80 fs/iomap/direct-io.c:694 ext4_dio_write_iter fs/ext4/file.c:587 [inline] ext4_file_write_iter+0xa27/0x1170 fs/ext4/file.c:698 do_iter_write+0x494/0x750 fs/read_write.c:861 vfs_iter_write+0x4c/0x70 fs/read_write.c:902 iter_file_splice_write+0x44a/0x7c0 fs/splice.c:686 do_splice_from fs/splice.c:764 [inline] direct_splice_actor+0x80/0xa0 fs/splice.c:931 splice_direct_to_actor+0x305/0x620 fs/splice.c:886 do_splice_direct+0xfb/0x180 fs/splice.c:974 do_sendfile+0x3bf/0x910 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000000000de -> 0x00000000000000d7 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 10756 Comm: syz-executor.5 Not tainted 6.1.0-rc4-syzkaller-00356-g8f2975c2bb4c-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 ==================================================================