linux-stable/kernel/cgroup
Chen Ridong 2190df6c91 cgroup/bpf: only cgroup v2 can be attached by bpf programs
Only cgroup v2 can be attached by bpf programs, so this patch introduces
that cgroup_bpf_inherit and cgroup_bpf_offline can only be called in
cgroup v2, and this can fix the memleak mentioned by commit 04f8ef5643
("cgroup: Fix memory leak caused by missing cgroup_bpf_offline"), which
has been reverted.

Fixes: 2b0d3d3e4f ("percpu_ref: reduce memory footprint of percpu_ref in fast path")
Fixes: 4bfc0bb2c6 ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself")
Link: https://lore.kernel.org/cgroups/aka2hk5jsel5zomucpwlxsej6iwnfw4qu5jkrmjhyfhesjlfdw@46zxhg5bdnr7/
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2024-10-21 10:02:35 -10:00
..
cgroup-internal.h mm, memcg: cg2 memory{.swap,}.peak write handlers 2024-09-01 20:25:53 -07:00
cgroup-v1.c cgroup: Do not report unavailable v1 controllers in /proc/cgroups 2024-09-10 10:04:28 -10:00
cgroup.c cgroup/bpf: only cgroup v2 can be attached by bpf programs 2024-10-21 10:02:35 -10:00
cpuset-internal.h cgroup/cpuset: Move cpu.h include to cpuset-internal.h 2024-09-04 10:46:49 -10:00
cpuset-v1.c cgroup/cpuset: rename functions shared between v1 and v2 2024-08-30 10:00:16 -10:00
cpuset.c cgroup/cpuset: Fix spelling errors in file kernel/cgroup/cpuset.c 2024-09-30 09:00:23 -10:00
debug.c kernel: cgroup: fix misuse of %x 2019-05-06 08:47:48 -07:00
freezer.c cgroup: cleanup comments 2022-03-13 19:19:27 -10:00
legacy_freezer.c cgroup, legacy_freezer: update comment for freezer_css_offline() 2024-04-18 06:01:50 -10:00
Makefile cgroup/cpuset: guard cpuset-v1 code under CONFIG_CPUSETS_V1 2024-08-30 10:00:16 -10:00
misc.c cgroup/misc: Introduce misc.events.local 2024-07-12 06:45:23 -10:00
namespace.c cgroup:namespace: Remove unused cgroup_namespaces_init() 2023-08-14 14:29:47 -10:00
pids.c cgroup/pids: Remove unreachable paths of pids_{can,cancel}_fork 2024-08-05 10:32:16 -10:00
rdma.c rdmacg: fix kernel-doc warnings in rdmacg 2023-06-05 09:45:14 -10:00
rstat.c cgroup/rstat: Tracking cgroup-level niced CPU time 2024-10-08 08:50:48 -10:00