From: Pavel Hrdina Date: Mon, 10 Sep 2018 13:43:42 +0000 (+0200) Subject: vircgroup: fix bug in virCgroupEnableMissingControllers X-Git-Tag: v4.8.0-rc1~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63b4ed0dd3e1555b4c9d82ef0ca0648493f75af2;p=thirdparty%2Flibvirt.git vircgroup: fix bug in virCgroupEnableMissingControllers If we are on host with systemd we need to build cgroup hierarchy ourselves for controllers that are not managed by systemd. As a starting parent we need to force root group because virCgroupMakeGroup() takes that parent in order to inherit values for cpuset controller. By default cpuset controller is managed by systemd so we will never hit the issue but for v2 cgroups we need to use parent cgroup every time. Reviewed-by: Fabiano Fidêncio Reviewed-by: Ján Tomko Signed-off-by: Pavel Hrdina --- diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index ec411a7b2b..8508a951d4 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -1491,7 +1491,7 @@ virCgroupEnableMissingControllers(char *path, int ret = -1; if (virCgroupNew(pidleader, - "", + "/", NULL, controllers, &parent) < 0)