================================================================== BUG: KCSAN: data-race in drain_all_stock / refill_stock read-write to 0xffff888237d283f0 of 4 bytes by task 10971 on cpu 1: __refill_stock mm/memcontrol.c:2249 [inline] refill_stock+0xcf/0x130 mm/memcontrol.c:2260 obj_cgroup_uncharge_pages+0x75/0x130 mm/memcontrol.c:3019 __memcg_kmem_uncharge_page+0x4f/0x100 mm/memcontrol.c:3092 free_pages_prepare mm/page_alloc.c:1441 [inline] free_pcp_prepare+0x5e/0x1d0 mm/page_alloc.c:1521 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x26/0x220 mm/page_alloc.c:3476 __vunmap+0x615/0x750 mm/vmalloc.c:2696 __vfree mm/vmalloc.c:2744 [inline] __vmalloc_area_node mm/vmalloc.c:3079 [inline] __vmalloc_node_range+0xdfd/0xef0 mm/vmalloc.c:3196 kvmalloc_node+0xf3/0x140 mm/util.c:634 kvmalloc include/linux/slab.h:750 [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+0x2724/0x2a90 net/ipv6/ipv6_sockglue.c:1026 udpv6_setsockopt+0x85/0x90 net/ipv6/udp.c:1652 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3583 __sys_setsockopt+0x212/0x2b0 net/socket.c:2252 __do_sys_setsockopt net/socket.c:2263 [inline] __se_sys_setsockopt net/socket.c:2260 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2260 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 0xffff888237d283f0 of 4 bytes by task 10977 on cpu 0: drain_all_stock+0xe5/0x310 mm/memcontrol.c:2290 try_charge_memcg+0x63a/0xa40 mm/memcontrol.c:2635 obj_cgroup_charge_pages mm/memcontrol.c:3040 [inline] __memcg_kmem_charge_page+0x2e4/0x480 mm/memcontrol.c:3066 __alloc_pages+0x1c1/0x340 mm/page_alloc.c:5532 alloc_page_interleave+0x1e/0x120 mm/mempolicy.c:2103 alloc_pages+0x356/0x4f0 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:2958 [inline] __vmalloc_area_node mm/vmalloc.c:3026 [inline] __vmalloc_node_range+0x730/0xef0 mm/vmalloc.c:3196 kvmalloc_node+0xf3/0x140 mm/util.c:634 kvmalloc include/linux/slab.h:750 [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+0x2724/0x2a90 net/ipv6/ipv6_sockglue.c:1026 udpv6_setsockopt+0x85/0x90 net/ipv6/udp.c:1652 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3583 __sys_setsockopt+0x212/0x2b0 net/socket.c:2252 __do_sys_setsockopt net/socket.c:2263 [inline] __se_sys_setsockopt net/socket.c:2260 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2260 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: 0x00000013 -> 0x00000007 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 10977 Comm: syz-executor.0 Not tainted 6.0.0-rc1-syzkaller-00025-g274a2eebf80c-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 ==================================================================