From: Alexander Mikhalitsyn Date: Mon, 12 Dec 2022 11:28:31 +0000 (+0100) Subject: cgroups: fix cgroup layout detection in __initialize_cgroups X-Git-Tag: v6.0.0~77^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4242%2Fhead;p=thirdparty%2Flxc.git 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 --- 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)