From: JP Kobryn <inwardvessel@gmail.com>
To: tj@kernel.org, yosryahmed@google.com, shakeel.butt@linux.dev
Cc: cgroups@vger.kernel.org
Subject: [PATCH] cgroup: fix goto ordering in cgroup_init()
Date: Thu, 24 Apr 2025 10:53:58 -0700 [thread overview]
Message-ID: <20250424175358.68389-1-inwardvessel@gmail.com> (raw)
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 <inwardvessel@gmail.com>
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(-)
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);
--
2.47.1
next reply other threads:[~2025-04-24 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 17:53 JP Kobryn [this message]
2025-04-24 18:38 ` [PATCH] cgroup: fix goto ordering in cgroup_init() Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424175358.68389-1-inwardvessel@gmail.com \
--to=inwardvessel@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox