]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: arena: Reintroduce memcg accounting
authorPuranjay Mohan <puranjay@kernel.org>
Fri, 2 Jan 2026 20:02:28 +0000 (12:02 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 2 Jan 2026 22:31:59 +0000 (14:31 -0800)
commite66fe1bc6d25d6fbced99de6c377f1b3d961a80e
tree018b2c54148636e944445795b87b9525a517ba28
parent817593af7b9ba56c23d9dd1858232c5493a14f55
bpf: arena: Reintroduce memcg accounting

When arena allocations were converted from bpf_map_alloc_pages() to
kmalloc_nolock() to support non-sleepable contexts, memcg accounting was
inadvertently lost. This commit restores proper memory accounting for
all arena-related allocations.

All arena related allocations are accounted into memcg of the process
that created bpf_arena.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102200230.25168-3-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/arena.c
kernel/bpf/range_tree.c
kernel/bpf/syscall.c