================================================================== BUG: KCSAN: data-race in drain_all_stock / drain_stock write to 0xffff888237c2a300 of 4 bytes by task 13814 on cpu 0: drain_stock+0x48/0xf0 mm/memcontrol.c:2273 __refill_stock+0x91/0xb0 mm/memcontrol.c:2320 refill_stock mm/memcontrol.c:2328 [inline] obj_cgroup_uncharge_pages+0xfb/0x1a0 mm/memcontrol.c:3088 __memcg_kmem_uncharge_page+0x53/0x100 mm/memcontrol.c:3161 free_pages_prepare mm/page_alloc.c:1151 [inline] free_unref_page_prepare+0x65/0x2a0 mm/page_alloc.c:2348 free_unref_page+0x34/0x170 mm/page_alloc.c:2443 vfree+0x27c/0x420 mm/vmalloc.c:2842 __vmalloc_area_node mm/vmalloc.c:3199 [inline] __vmalloc_node_range+0xde0/0xea0 mm/vmalloc.c:3316 kvmalloc_node+0x121/0x160 mm/util.c:629 kvmalloc include/linux/slab.h:720 [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+0x615/0x1390 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:1467 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3695 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3686 __sys_setsockopt+0x1c9/0x230 net/socket.c:2263 __do_sys_setsockopt net/socket.c:2274 [inline] __se_sys_setsockopt net/socket.c:2271 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888237c2a300 of 4 bytes by task 13936 on cpu 1: drain_all_stock+0xd3/0x2d0 mm/memcontrol.c:2358 try_charge_memcg+0x6c5/0xd20 mm/memcontrol.c:2703 try_charge mm/memcontrol.c:2837 [inline] charge_memcg+0x51/0x200 mm/memcontrol.c:6976 mem_cgroup_swapin_charge_folio+0xd0/0x150 mm/memcontrol.c:7032 __read_swap_cache_async+0x2fe/0x560 mm/swap_state.c:489 read_swap_cache_async mm/swap_state.c:534 [inline] swap_cluster_readahead+0x488/0x4f0 mm/swap_state.c:673 swapin_readahead+0x8d/0x700 mm/swap_state.c:861 do_swap_page+0x4d7/0x1550 mm/memory.c:3813 handle_pte_fault mm/memory.c:4942 [inline] __handle_mm_fault mm/memory.c:5079 [inline] handle_mm_fault+0x9ec/0x2c10 mm/memory.c:5233 do_user_addr_fault arch/x86/mm/fault.c:1392 [inline] handle_page_fault arch/x86/mm/fault.c:1486 [inline] exc_page_fault+0x24d/0x650 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 value changed: 0x00000041 -> 0x0000001c Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 13936 Comm: syz-executor.3 Not tainted 6.5.0-rc2-syzkaller-00052-gbfa3037d8280 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 ==================================================================