On Thu, Oct 17, 2024 at 08:17:58PM GMT, Chen Ridong <chenridong@xxxxxxxxxxxxxxx> wrote: > So, should commit 04f8ef5643bc ("cgroup: Fix memory leak caused by missing > cgroup_bpf_offline") be reverted, and should cgroup_bpf_inherit be only > called in v2? Yes, that should resolve both the original leak and the current NULL ptr dereference without extra rebinding complications. I'd like to keep only cgroup v2 be attachable by BPF programs. cgroup_v1v2_get_from_fd serves the needs of traversing v1 hierarchies, not program attchments. I hope this proposal is workable also from the CC'ed BPF people perspective. Michal