================================================================== BUG: KCSAN: data-race in __delete_from_swap_cache / folio_mapping write to 0xffffea00042177e8 of 8 bytes by task 3317 on cpu 0: __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:1776 do_swap_page+0x1546/0x2460 mm/memory.c:4735 handle_pte_fault mm/memory.c:6000 [inline] __handle_mm_fault mm/memory.c:6140 [inline] handle_mm_fault+0x9a5/0x2c00 mm/memory.c:6309 do_user_addr_fault+0x3fe/0x1090 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1479 [inline] exc_page_fault+0x3d/0xb0 arch/x86/mm/fault.c:1535 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 read to 0xffffea00042177e8 of 8 bytes by task 32166 on cpu 1: folio_mapping+0xdd/0x120 mm/util.c:699 folio_evictable mm/internal.h:475 [inline] sort_folio mm/vmscan.c:4439 [inline] scan_folios mm/vmscan.c:4565 [inline] isolate_folios mm/vmscan.c:4660 [inline] evict_folios+0xdb9/0x33d0 mm/vmscan.c:4689 try_to_shrink_lruvec+0x45a/0x7e0 mm/vmscan.c:4862 lru_gen_shrink_lruvec mm/vmscan.c:5011 [inline] shrink_lruvec+0x22e/0x1a40 mm/vmscan.c:5756 shrink_node_memcgs mm/vmscan.c:5992 [inline] shrink_node+0x686/0x2110 mm/vmscan.c:6033 shrink_zones mm/vmscan.c:6277 [inline] do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6339 try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6667 try_charge_memcg+0x3ab/0x870 mm/memcontrol.c:2302 obj_cgroup_charge_pages+0xb7/0x1a0 mm/memcontrol.c:2693 __memcg_kmem_charge_page+0x9f/0x170 mm/memcontrol.c:2737 __alloc_frozen_pages_noprof+0x188/0x360 mm/page_alloc.c:4991 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0x90/0x130 mm/mempolicy.c:2392 vm_area_alloc_pages mm/vmalloc.c:3592 [inline] __vmalloc_area_node mm/vmalloc.c:3670 [inline] __vmalloc_node_range_noprof+0x6d5/0xe40 mm/vmalloc.c:3845 __kvmalloc_node_noprof+0x312/0x4f0 mm/slub.c:5034 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:302 netlink_rcv_skb+0x120/0x220 net/netlink/af_netlink.c:2534 nfnetlink_rcv+0x16b/0x1690 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x59e/0x670 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1883 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+0xd0/0x1b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x0000000000002d5b -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 32166 Comm: GPL Not tainted 6.15.0-syzkaller-01958-g785cdec46e92 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 ================================================================== GPL invoked oom-killer: gfp_mask=0x402dc2(GFP_KERNEL_ACCOUNT|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), order=0, oom_score_adj=0 CPU: 1 UID: 0 PID: 32166 Comm: GPL Not tainted 6.15.0-syzkaller-01958-g785cdec46e92 #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+0x13d/0x190 mm/memcontrol.c:1665 mem_cgroup_oom mm/memcontrol.c:1688 [inline] try_charge_memcg+0x5e2/0x870 mm/memcontrol.c:2344 obj_cgroup_charge_pages+0xb7/0x1a0 mm/memcontrol.c:2693 __memcg_kmem_charge_page+0x9f/0x170 mm/memcontrol.c:2737 __alloc_frozen_pages_noprof+0x188/0x360 mm/page_alloc.c:4991 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0x90/0x130 mm/mempolicy.c:2392 vm_area_alloc_pages mm/vmalloc.c:3592 [inline] __vmalloc_area_node mm/vmalloc.c:3670 [inline] __vmalloc_node_range_noprof+0x6d5/0xe40 mm/vmalloc.c:3845 __kvmalloc_node_noprof+0x312/0x4f0 mm/slub.c:5034 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:302 netlink_rcv_skb+0x120/0x220 net/netlink/af_netlink.c:2534 nfnetlink_rcv+0x16b/0x1690 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x59e/0x670 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1883 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+0xd0/0x1b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc2df09e969 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:00007fc2dd707038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fc2df2c5fa0 RCX: 00007fc2df09e969 RDX: 0000000004000000 RSI: 0000200000000040 RDI: 0000000000000007 RBP: 00007fc2df120ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc2df2c5fa0 R15: 00007ffd1d7d9168 memory: usage 307200kB, limit 307200kB, failcnt 3123 memory+swap: usage 327664kB, limit 9007199254740988kB, failcnt 0 kmem: usage 307200kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz1: cache 0 rss 0 shmem 0 mapped_file 0 dirty 0 writeback 0 workingset_refault_anon 2470 workingset_refault_file 5762 swap 20955136 swapcached 0 nr_memmap_boot_pages 708389 pgpgin 708389 pglazyfree 742513 pgfault 427 a_other 0 inactive_anon 0 active_anon 0 inactive_file 0 active_file 0 hierarchical_memory_limit 314572800 hierarchical_memsw_limit 9223372036854771712 total_cache 0 total_rss 0 total_shmem 0 total_mapped_file 0 total_dirty 0 total_writeback 0 total_workingset_refault_anon 2470 total_workingset_refault_file 5762 total_swap 20955136 total_swapcached 0 total_nr_memmap_boot_pages 719533 total_pgpgin 719533 total_pglazyfree 751544 total_pgfault 427 total_a_other 0 total_inactive_anon 0 total_active_anon 0 total_inactive_file 0 total_active_file 0 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/syz1,task_memcg=/syz1,task=syz.1.11263,pid=32165,uid=0 Memory cgroup out of memory: Killed process 32165 (syz.1.11263) total-vm:95796kB, anon-rss:1060kB, file-rss:22332kB, shmem-rss:0kB, UID:0 pgtables:132kB oom_score_adj:0