================================================================== BUG: KCSAN: data-race in drain_all_stock / refill_stock read-write to 0xffff888237d28630 of 4 bytes by task 17714 on cpu 1: __refill_stock mm/memcontrol.c:2308 [inline] refill_stock+0xcf/0x130 mm/memcontrol.c:2319 obj_cgroup_uncharge_pages+0x75/0x130 mm/memcontrol.c:3081 __memcg_kmem_uncharge_page+0x4f/0x100 mm/memcontrol.c:3154 free_pages_prepare mm/page_alloc.c:1438 [inline] free_pcp_prepare+0x5e/0x1d0 mm/page_alloc.c:1519 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x18/0x1e0 mm/page_alloc.c:3464 __vunmap+0x615/0x750 mm/vmalloc.c:2727 __vfree mm/vmalloc.c:2775 [inline] __vmalloc_area_node mm/vmalloc.c:3110 [inline] __vmalloc_node_range+0xec5/0xf90 mm/vmalloc.c:3227 kvmalloc_node+0x11d/0x160 mm/util.c:606 kvmalloc include/linux/slab.h:737 [inline] xt_alloc_table_info+0x39/0x70 net/netfilter/x_tables.c:1192 do_replace net/ipv6/netfilter/ip6_tables.c:1142 [inline] do_ip6t_set_ctl+0x645/0x1790 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x1a6/0x1c0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x118/0x130 net/ipv6/ipv6_sockglue.c:1028 udpv6_setsockopt+0x91/0xa0 net/ipv6/udp.c:1686 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3664 __sys_setsockopt+0x1c8/0x230 net/socket.c:2246 __do_sys_setsockopt net/socket.c:2257 [inline] __se_sys_setsockopt net/socket.c:2254 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2254 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888237d28630 of 4 bytes by task 17713 on cpu 0: drain_all_stock+0xcd/0x2b0 mm/memcontrol.c:2349 try_charge_memcg+0x5cd/0x9b0 mm/memcontrol.c:2696 obj_cgroup_charge_pages mm/memcontrol.c:3102 [inline] __memcg_kmem_charge_page+0x2e4/0x480 mm/memcontrol.c:3128 __alloc_pages+0x1c1/0x340 mm/page_alloc.c:5566 alloc_pages+0x3f1/0x4f0 vm_area_alloc_pages mm/vmalloc.c:2989 [inline] __vmalloc_area_node mm/vmalloc.c:3057 [inline] __vmalloc_node_range+0x780/0xf90 mm/vmalloc.c:3227 kvmalloc_node+0x11d/0x160 mm/util.c:606 kvmalloc include/linux/slab.h:737 [inline] xt_alloc_table_info+0x39/0x70 net/netfilter/x_tables.c:1192 do_replace net/ipv6/netfilter/ip6_tables.c:1142 [inline] do_ip6t_set_ctl+0x645/0x1790 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x1a6/0x1c0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x118/0x130 net/ipv6/ipv6_sockglue.c:1028 udpv6_setsockopt+0x91/0xa0 net/ipv6/udp.c:1686 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3664 __sys_setsockopt+0x1c8/0x230 net/socket.c:2246 __do_sys_setsockopt net/socket.c:2257 [inline] __se_sys_setsockopt net/socket.c:2254 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2254 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x0000001e -> 0x00000020 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 17713 Comm: syz-executor.3 Not tainted 6.2.0-rc5-syzkaller-00205-gc96618275234-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 ================================================================== syz-executor.3 (17713) used greatest stack depth: 10992 bytes left