From 42b22da6d1b9dda468580e01c466e1c0e91c7925 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Mon, 12 Dec 2022 12:28:31 +0100 Subject: [PATCH] cgroups: fix cgroup layout detection in __initialize_cgroups It looks like we made a mistake while detecting cgroup layout, we are always set CGFSNG_LAYOUT_UNIFIED bit. Reported-by: coverity (CID #1497115) Signed-off-by: Alexander Mikhalitsyn --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index eeb817334..cecc9bcc2 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -3646,7 +3646,7 @@ static int __initialize_cgroups(struct cgroup_ops *ops, bool relative, char *__controllers, *__current_cgroup; type = LEGACY_HIERARCHY; - layout_mask |= CGFSNG_LAYOUT_UNIFIED; + layout_mask |= CGFSNG_LAYOUT_LEGACY; __controllers = strchr(line, ':'); if (!__controllers) -- 2.47.2