Skip to content

Commit dd6ade9

Browse files
Chen Ridonggregkh
authored andcommitted
Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"
[ Upstream commit feb301c ] This reverts commit 04f8ef5. Only cgroup v2 can be attached by cgroup by BPF programs. Revert this commit and cgroup_bpf_inherit and cgroup_bpf_offline won't be called in cgroup v1. The memory leak issue will be fixed with next patch. Fixes: 04f8ef5 ("cgroup: Fix memory leak caused by missing cgroup_bpf_offline") Link: https://lore.kernel.org/cgroups/aka2hk5jsel5zomucpwlxsej6iwnfw4qu5jkrmjhyfhesjlfdw@46zxhg5bdnr7/ Signed-off-by: Chen Ridong <chenridong@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent daaeba2 commit dd6ade9

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

kernel/cgroup/cgroup.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,10 +2314,8 @@ static void cgroup_kill_sb(struct super_block *sb)
23142314
* And don't kill the default root.
23152315
*/
23162316
if (list_empty(&root->cgrp.self.children) && root != &cgrp_dfl_root &&
2317-
!percpu_ref_is_dying(&root->cgrp.self.refcnt)) {
2318-
cgroup_bpf_offline(&root->cgrp);
2317+
!percpu_ref_is_dying(&root->cgrp.self.refcnt))
23192318
percpu_ref_kill(&root->cgrp.self.refcnt);
2320-
}
23212319
cgroup_put(&root->cgrp);
23222320
kernfs_kill_sb(sb);
23232321
}

0 commit comments

Comments
 (0)