Linux cgroups development
 help / color / mirror / Atom feed
* [PATCH] cgroup: fix goto ordering in cgroup_init()
@ 2025-04-24 17:53 JP Kobryn
  2025-04-24 18:38 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: JP Kobryn @ 2025-04-24 17:53 UTC (permalink / raw)
  To: tj, yosryahmed, shakeel.butt; +Cc: cgroups

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-24 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 17:53 [PATCH] cgroup: fix goto ordering in cgroup_init() JP Kobryn
2025-04-24 18:38 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox