oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz4,mems_allowed=0,oom_memcg=/syz4,task_memcg=/syz4,task=syz-executor.4,pid=329,uid=0 Memory cgroup out of memory: Killed process 329 (syz-executor.4) total-vm:46436kB, anon-rss:504kB, file-rss:8832kB, shmem-rss:0kB, UID:0 pgtables:88kB oom_score_adj:1000 ================================================================== BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg write to 0xffff888237d2a3c0 of 4 bytes by task 350 on cpu 1: consume_stock mm/memcontrol.c:2297 [inline] try_charge_memcg+0xb49/0xd30 mm/memcontrol.c:2703 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3255 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3281 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4585 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133 alloc_pages+0xe0/0x100 mm/mempolicy.c:2204 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3320 kvmalloc_node+0x121/0x160 mm/util.c:642 kvmalloc include/linux/slab.h:738 [inline] xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192 do_replace net/ipv4/netfilter/arp_tables.c:970 [inline] do_arpt_set_ctl+0x634/0x13b0 net/ipv4/netfilter/arp_tables.c:1421 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1426 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3724 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3711 do_sock_setsockopt net/socket.c:2311 [inline] __sys_setsockopt+0x1d4/0x240 net/socket.c:2334 __do_sys_setsockopt net/socket.c:2343 [inline] __se_sys_setsockopt net/socket.c:2340 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff888237d2a3c0 of 4 bytes by task 329 on cpu 0: drain_all_stock+0xd3/0x2d0 mm/memcontrol.c:2405 try_charge_memcg+0x6c5/0xd30 mm/memcontrol.c:2750 try_charge mm/memcontrol.c:2884 [inline] charge_memcg mm/memcontrol.c:7210 [inline] mem_cgroup_swapin_charge_folio+0x107/0x190 mm/memcontrol.c:7295 __read_swap_cache_async+0x2f6/0x550 mm/swap_state.c:490 swap_cluster_readahead+0x27c/0x4c0 mm/swap_state.c:655 swapin_readahead+0xe9/0x7f0 mm/swap_state.c:878 do_swap_page+0x4a0/0x1670 mm/memory.c:3884 handle_pte_fault mm/memory.c:5042 [inline] __handle_mm_fault mm/memory.c:5180 [inline] handle_mm_fault+0xa36/0x2dd0 mm/memory.c:5345 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2f7/0x6c0 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:86 mm_release+0x93/0x1e0 kernel/fork.c:1639 exit_mm_release+0x25/0x30 kernel/fork.c:1657 exit_mm+0x37/0x180 kernel/exit.c:540 do_exit+0x585/0x16d0 kernel/exit.c:856 do_group_exit+0x101/0x150 kernel/exit.c:1018 get_signal+0xf4e/0x10a0 kernel/signal.c:2904 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309 irqentry_exit+0x12/0x40 kernel/entry/common.c:412 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 value changed: 0x0000000a -> 0x00000034 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 329 Comm: syz-executor.4 Not tainted 6.7.0-rc7-syzkaller-00051-g2639772a11c8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 ==================================================================