================================================================== BUG: KCSAN: data-race in __delete_from_swap_cache / folio_mapping write to 0xffffea00042af668 of 8 bytes by task 16099 on cpu 1: __delete_from_swap_cache+0x1e8/0x280 mm/swap_state.c:161 delete_from_swap_cache+0x73/0xe0 mm/swap_state.c:180 folio_free_swap+0x188/0x1a0 mm/swapfile.c:1785 do_swap_page+0x1507/0x2430 mm/memory.c:4806 handle_pte_fault mm/memory.c:6072 [inline] __handle_mm_fault mm/memory.c:6212 [inline] handle_mm_fault+0x9a5/0x2be0 mm/memory.c:6381 do_user_addr_fault+0x3fe/0x1090 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 read to 0xffffea00042af668 of 8 bytes by task 16100 on cpu 0: folio_mapping+0xdd/0x120 mm/util.c:699 folio_evictable mm/internal.h:478 [inline] sort_folio mm/vmscan.c:4469 [inline] scan_folios mm/vmscan.c:4595 [inline] isolate_folios mm/vmscan.c:4690 [inline] evict_folios+0xdb9/0x33d0 mm/vmscan.c:4719 try_to_shrink_lruvec+0x45a/0x7e0 mm/vmscan.c:4892 lru_gen_shrink_lruvec mm/vmscan.c:5041 [inline] shrink_lruvec+0x22e/0x1b40 mm/vmscan.c:5797 shrink_node_memcgs mm/vmscan.c:6033 [inline] shrink_node+0x686/0x2120 mm/vmscan.c:6074 shrink_zones mm/vmscan.c:6318 [inline] do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6380 try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6708 try_charge_memcg+0x358/0x9e0 mm/memcontrol.c:2360 obj_cgroup_charge_pages+0xa6/0x150 mm/memcontrol.c:2801 __memcg_kmem_charge_page+0x9f/0x170 mm/memcontrol.c:2845 __alloc_frozen_pages_noprof+0x188/0x360 mm/page_alloc.c:4976 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0x90/0x130 mm/mempolicy.c:2510 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x6f2/0xe00 mm/vmalloc.c:3893 __kvmalloc_node_noprof+0x30f/0x4e0 mm/slub.c:5037 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:261 hash_netiface_create+0x282/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x3c9/0x960 net/netfilter/ipset/ip_set_core.c:1109 nfnetlink_rcv_msg+0x4c3/0x590 net/netfilter/nfnetlink.c:303 netlink_rcv_skb+0x120/0x220 net/netlink/af_netlink.c:2552 nfnetlink_rcv+0x16b/0x1690 net/netfilter/nfnetlink.c:668 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x5a5/0x680 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x145/0x180 net/socket.c:727 ____sys_sendmsg+0x31e/0x4e0 net/socket.c:2566 ___sys_sendmsg+0x17b/0x1d0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2655 x64_sys_call+0x2999/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x0000000000002b22 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 16100 Comm: syz.5.3454 Not tainted 6.16.0-rc6-syzkaller-00002-g155a3c003e55 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 ================================================================== syz.5.3454 invoked oom-killer: gfp_mask=0x402dc2(GFP_KERNEL_ACCOUNT|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), order=0, oom_score_adj=1000 CPU: 0 UID: 0 PID: 16100 Comm: syz.5.3454 Not tainted 6.16.0-rc6-syzkaller-00002-g155a3c003e55 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x1d/0x30 lib/dump_stack.c:94 dump_stack_lvl+0xe8/0x140 lib/dump_stack.c:120 dump_stack+0x15/0x1b lib/dump_stack.c:129 dump_header+0x81/0x220 mm/oom_kill.c:467 oom_kill_process+0x334/0x3f0 mm/oom_kill.c:1040 out_of_memory+0x979/0xb80 mm/oom_kill.c:1178 mem_cgroup_out_of_memory mm/memcontrol.c:1652 [inline] mem_cgroup_oom mm/memcontrol.c:1675 [inline] try_charge_memcg+0x5e6/0x9e0 mm/memcontrol.c:2402 obj_cgroup_charge_pages+0xa6/0x150 mm/memcontrol.c:2801 __memcg_kmem_charge_page+0x9f/0x170 mm/memcontrol.c:2845 __alloc_frozen_pages_noprof+0x188/0x360 mm/page_alloc.c:4976 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0x90/0x130 mm/mempolicy.c:2510 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x6f2/0xe00 mm/vmalloc.c:3893 __kvmalloc_node_noprof+0x30f/0x4e0 mm/slub.c:5037 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:261 hash_netiface_create+0x282/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x3c9/0x960 net/netfilter/ipset/ip_set_core.c:1109 nfnetlink_rcv_msg+0x4c3/0x590 net/netfilter/nfnetlink.c:303 netlink_rcv_skb+0x120/0x220 net/netlink/af_netlink.c:2552 nfnetlink_rcv+0x16b/0x1690 net/netfilter/nfnetlink.c:668 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x5a5/0x680 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x145/0x180 net/socket.c:727 ____sys_sendmsg+0x31e/0x4e0 net/socket.c:2566 ___sys_sendmsg+0x17b/0x1d0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2655 x64_sys_call+0x2999/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3e90c7e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3e8f2e7038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3e90ea5fa0 RCX: 00007f3e90c7e929 RDX: 0000000000000800 RSI: 0000200000000040 RDI: 0000000000000006 RBP: 00007f3e90d00b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3e90ea5fa0 R15: 00007fff16df88a8 memory: usage 307200kB, limit 307200kB, failcnt 2291 memory+swap: usage 307560kB, limit 9007199254740988kB, failcnt 0 kmem: usage 307164kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz5: cache 0 rss 4096 shmem 0 mapped_file 0 dirty 0 writeback 0 workingset_refault_anon 942 workingset_refault_file 11223 swap 368640 swapcached 32768 pgpgin 320374 pgpgout 320365 pgfault 208121 pgmajfault 523 inactive_anon 32768 active_anon 0 inactive_file 4096 active_file 0 unevictable 0 hierarchical_memory_limit 314572800 hierarchical_memsw_limit 9223372036854771712 total_cache 0 total_rss 4096 total_shmem 0 total_mapped_file 0 total_dirty 0 total_writeback 0 total_workingset_refault_anon 942 total_workingset_refault_file 11223 total_swap 368640 total_swapcached 32768 total_pgpgin 320374 total_pgpgout 320365 total_pgfault 208121 total_pgmajfault 523 total_inactive_anon 32768 total_active_anon 0 total_inactive_file 4096 total_active_file 0 total_unevictable 0 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/syz5,task_memcg=/syz5,task=syz.5.3454,pid=16099,uid=0 Memory cgroup out of memory: Killed process 16099 (syz.5.3454) total-vm:98124kB, anon-rss:1020kB, file-rss:26536kB, shmem-rss:0kB, UID:0 pgtables:132kB oom_score_adj:1000