diff options
author | JP Kobryn <inwardvessel@gmail.com> | 2025-04-24 10:53:58 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-04-24 08:36:57 -1000 |
commit | f304da9134f8c245d198502ad681ffae63b5e29c (patch) | |
tree | 854587518a79781b585cb9b7919025435bf9b64f | |
parent | 7efbc8f2f9b3eed3ffc6560abf8305859f2153d3 (diff) |
cgroup: fix goto ordering in cgroup_init()
Go to the appropriate section labels when css_rstat_init() or
psi_cgroup_alloc() fails.
Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Fixes: a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based")
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/cgroup/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index c284df1efc9f..7471811a00de 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -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); |