diff options
| author | Puranjay Mohan <puranjay@kernel.org> | 2026-01-02 23:02:27 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-01-03 01:31:59 +0300 |
| commit | 817593af7b9ba56c23d9dd1858232c5493a14f55 (patch) | |
| tree | 445ee3725fca4c8963bb827a0e872ca9dfd71ac5 /include/linux/stacktrace.h | |
| parent | e40030a46acc07bb956068e59c614f1a17459a18 (diff) | |
| download | linux-817593af7b9ba56c23d9dd1858232c5493a14f55.tar.xz | |
bpf: syscall: Introduce memcg enter/exit helpers
Introduce bpf_map_memcg_enter() and bpf_map_memcg_exit() helpers to
reduce code duplication in memcg context management.
bpf_map_memcg_enter() gets the memcg from the map, sets it as active,
and returns both the previous and the now active memcg.
bpf_map_memcg_exit() restores the previous active memcg and releases the
reference obtained during enter.
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102200230.25168-2-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/stacktrace.h')
0 files changed, 0 insertions, 0 deletions
