================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / folio_mapping write to 0xffffea00051d0a98 of 8 bytes by task 3726 on cpu 0: page_cache_delete mm/filemap.c:152 [inline] __filemap_remove_folio+0x1ac/0x2c0 mm/filemap.c:232 filemap_remove_folio+0x6b/0x1f0 mm/filemap.c:264 truncate_inode_folio+0x42/0x50 mm/truncate.c:162 shmem_undo_range+0x25b/0xa70 mm/shmem.c:1036 shmem_truncate_range mm/shmem.c:1152 [inline] shmem_evict_inode+0x14d/0x530 mm/shmem.c:1280 evict+0x2f0/0x570 fs/inode.c:796 iput_final fs/inode.c:1946 [inline] iput+0x42a/0x5b0 fs/inode.c:1972 dentry_unlink_inode+0x24f/0x260 fs/dcache.c:422 __dentry_kill+0x18b/0x4c0 fs/dcache.c:625 dput+0x5c/0xd0 fs/dcache.c:867 __fput+0x3fb/0x6d0 fs/file_table.c:458 ____fput+0x1c/0x30 fs/file_table.c:478 task_work_run+0x13a/0x1a0 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0x5dd/0x17f0 kernel/exit.c:938 do_group_exit+0x102/0x150 kernel/exit.c:1087 get_signal+0xeb9/0x1000 kernel/signal.c:3016 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] irqentry_exit_to_user_mode+0xa7/0x120 kernel/entry/common.c:231 irqentry_exit+0x12/0x50 kernel/entry/common.c:334 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 read to 0xffffea00051d0a98 of 8 bytes by task 3778 on cpu 1: folio_mapping+0xa0/0x120 mm/util.c:847 folio_evictable mm/internal.h:435 [inline] sort_folio mm/vmscan.c:4299 [inline] scan_folios mm/vmscan.c:4424 [inline] isolate_folios mm/vmscan.c:4550 [inline] evict_folios+0x83f/0x3240 mm/vmscan.c:4581 try_to_shrink_lruvec+0x5d2/0x750 mm/vmscan.c:4789 lru_gen_shrink_lruvec mm/vmscan.c:4938 [inline] shrink_lruvec+0x22d/0x1840 mm/vmscan.c:5693 shrink_node_memcgs mm/vmscan.c:5929 [inline] shrink_node+0x603/0x1d80 mm/vmscan.c:5970 shrink_zones mm/vmscan.c:6215 [inline] do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6277 try_to_free_mem_cgroup_pages+0x1e3/0x490 mm/vmscan.c:6609 try_charge_memcg+0x2bc/0x7f0 mm/memcontrol.c:2238 obj_cgroup_charge_pages+0xbd/0x1a0 mm/memcontrol.c:2646 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:2673 __alloc_pages_noprof+0x1bc/0x340 mm/page_alloc.c:4768 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2265 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2344 vm_area_alloc_pages mm/vmalloc.c:3589 [inline] __vmalloc_area_node mm/vmalloc.c:3667 [inline] __vmalloc_node_range_noprof+0x6eb/0xe80 mm/vmalloc.c:3844 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:672 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:256 hash_netiface_create+0x273/0x730 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1104 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2542 nfnetlink_rcv+0x16c/0x15d0 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:726 ____sys_sendmsg+0x312/0x410 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x19d/0x230 net/socket.c:2669 __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2672 x64_sys_call+0x2734/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xffff888104201c18 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 3778 Comm: syz.4.105 Not tainted 6.12.0-syzkaller-10689-g7af08b57bcb9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ================================================================== syz.4.105 (3778) used greatest stack depth: 6728 bytes left