mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] cgroup: avoid invalid loop in cgroup_no_v1()
@ 2024-04-19  8:53 Xiu Jianfeng
  2024-04-19 15:45 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Xiu Jianfeng @ 2024-04-19  8:53 UTC (permalink / raw)
  To: tj, lizefan.x, hannes; +Cc: cgroups, linux-kernel

We should break the for_each_subsys loop after the token matches
the name of subsys and cgroup_no_v1_mask is set.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
 kernel/cgroup/cgroup-v1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 520a11cb12f4..b9dbf6bf2779 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -1335,6 +1335,7 @@ static int __init cgroup_no_v1(char *str)
 				continue;
 
 			cgroup_no_v1_mask |= 1 << i;
+			break;
 		}
 	}
 	return 1;
-- 
2.34.1


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

end of thread, other threads:[~2024-04-19 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19  8:53 [PATCH -next] cgroup: avoid invalid loop in cgroup_no_v1() Xiu Jianfeng
2024-04-19 15:45 ` Tejun Heo

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

all inboxes | Powered by JetHome®