================================================================== BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg write to 0xffff888237c2a690 of 4 bytes by task 3091 on cpu 0: consume_stock mm/memcontrol.c:2322 [inline] try_charge_memcg+0xb46/0xd20 mm/memcontrol.c:2743 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301 obj_cgroup_charge+0xec/0x140 mm/memcontrol.c:3592 __memcg_slab_pre_alloc_hook+0xe3/0x120 mm/slub.c:1929 memcg_slab_pre_alloc_hook mm/slub.c:1950 [inline] slab_pre_alloc_hook mm/slub.c:3766 [inline] slab_alloc_node mm/slub.c:3842 [inline] kmem_cache_alloc+0x18d/0x2d0 mm/slub.c:3867 sk_prot_alloc+0x41/0x190 net/core/sock.c:2072 sk_alloc+0x33/0x350 net/core/sock.c:2131 inet_create+0x3bd/0x740 net/ipv4/af_inet.c:325 __sock_create+0x2d7/0x4e0 net/socket.c:1571 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0xad/0x230 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x3f/0x50 net/socket.c:1718 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff888237c2a690 of 4 bytes by task 19399 on cpu 1: drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2430 try_charge_memcg+0x6c2/0xd20 mm/memcontrol.c:2790 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584 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+0x6ee/0xec0 mm/vmalloc.c:3320 __bpf_map_area_alloc kernel/bpf/syscall.c:306 [inline] bpf_map_area_alloc+0xd8/0x100 kernel/bpf/syscall.c:313 bloom_map_alloc+0x1aa/0x2b0 kernel/bpf/bloom_filter.c:134 map_create+0x713/0xa40 kernel/bpf/syscall.c:1237 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5439 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline] __se_sys_bpf kernel/bpf/syscall.c:5559 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5559 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x00000040 -> 0x0000003f Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19399 Comm: syz-executor.2 Not tainted 6.8.0-rc7-syzkaller-00017-g29cd507cbec2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================