diff options
| author | JP Kobryn <[email protected]> | 2025-04-24 17:53:58 +0000 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2025-04-24 18:36:57 +0000 |
| commit | f304da9134f8c245d198502ad681ffae63b5e29c (patch) | |
| tree | 854587518a79781b585cb9b7919025435bf9b64f | |
| parent | cgroup: fix pointer check in css_rstat_init() (diff) | |
| download | kernel-f304da9134f8c245d198502ad681ffae63b5e29c.tar.gz kernel-f304da9134f8c245d198502ad681ffae63b5e29c.zip | |
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 <[email protected]>
Fixes: a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based")
Signed-off-by: Tejun Heo <[email protected]>
| -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); |
