cgroup: fix goto ordering in cgroup_init()
PATCH 1/1 cgroup: fix goto ordering in cgroup_init()
Go to the appropriate section labels when css_rstat_init() or psi_cgroup_alloc() fails.
This is intended for branch "for-6.16" on "tj/cgroup.git".
Signed-off-by JP Kobryn <[email protected]>
Fixes a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based")
--- kernel/cgroup/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup/cgroup.c +2 -2
@@ -5708,11 +5708,11 @@ static struct cgroup *cgroup_create(struct cgroup *parent, const char *name,*/ ret =css_rstat_init (&cgrp->self);if (ret) - goto out_stat_exit; + goto out_kernfs_remove; ret =psi_cgroup_alloc (cgrp);if (ret) - goto out_kernfs_remove; + goto out_stat_exit;if (cgrp->root == &cgrp_dfl_root) { ret =cgroup_bpf_inherit (cgrp);
Signature · 1 line
2.47.1
Quoted 4 lines · JP Kobryn
Go to the appropriate section labels when
css_rstat_init()orpsi_cgroup_alloc()fails.This is intended for branch "for-6.16" on "tj/cgroup.git".
I think the more common convention for saying the above is using "[PATCH cgroup/for-6.16]" in the subject line.
Quoted 2 lines
Signed-off-by JP Kobryn <[email protected]>Fixes a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based")
Applied to cgroup/for-6.16.
Thanks.
Signature · 1 line
tejun