================================================================== BUG: KCSAN: data-race in drain_all_stock / refill_stock read-write to 0xffff888237d283f0 of 4 bytes by task 6871 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/ipv4/netfilter/ip_tables.c:1125 [inline] do_ipt_set_ctl+0x63c/0x16e0 net/ipv4/netfilter/ip_tables.c:1630 nf_setsockopt+0x1a6/0x1c0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x1741/0x1ea0 net/ipv4/ip_sockglue.c:1444 tcp_setsockopt+0x177/0x1be0 net/ipv4/tcp.c:3792 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 6864 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_pages+0x3f4/0x4f0 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/ipv4/netfilter/ip_tables.c:1125 [inline] do_ipt_set_ctl+0x63c/0x16e0 net/ipv4/netfilter/ip_tables.c:1630 nf_setsockopt+0x1a6/0x1c0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x1741/0x1ea0 net/ipv4/ip_sockglue.c:1444 tcp_setsockopt+0x177/0x1be0 net/ipv4/tcp.c:3792 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: 0x00000016 -> 0x00000018 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 6864 Comm: syz-executor.5 Not tainted 6.0.0-rc1-syzkaller-00067-g573ae4f13f63-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 ==================================================================