================================================================== BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg write to 0xffff888237c2a690 of 4 bytes by task 21788 on cpu 0: consume_stock mm/memcontrol.c:2317 [inline] try_charge_memcg+0xb46/0xd20 mm/memcontrol.c:2738 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3296 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3322 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline] bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170 ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204 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 read to 0xffff888237c2a690 of 4 bytes by task 21729 on cpu 1: drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2425 try_charge_memcg+0x6c2/0xd20 mm/memcontrol.c:2785 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3296 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3322 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline] bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170 ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204 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: 0x00000002 -> 0x0000003e Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 21729 Comm: syz-executor.0 Not tainted 6.8.0-rc2-syzkaller-00055-g6764c317b6bb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================