Unverified Commit ba9eab74 by Christian Brauner Committed by Stéphane Graber

cgroups: ignore cgroup2 limits on non-cgroup2 layouts

Mixing cgroup2 and legacy cgroup systems such that some controllers are enabled in legacy cgroup hierarchies and other controllers in the unified hierarchies is simply not something we're supporting. Even systemd's hybrid layout (crazy) doesn't bind controllers to the unified cgroup hierarchy. Fixes: #3183 Cc: Thomas Moschny <thomas.moschny@gmx.de> Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 3a4031f0
......@@ -2792,9 +2792,12 @@ __cgfsng_ops static bool cgfsng_setup_limits(struct cgroup_ops *ops,
return ret_set_errno(false, EINVAL);
conf = handler->conf;
if (lxc_list_empty(&conf->cgroup2))
return true;
cgroup_settings = &conf->cgroup2;
if (lxc_list_empty(cgroup_settings))
return true;
if (!pure_unified_layout(ops))
return log_warn_errno(true, EINVAL, "Ignoring cgroup2 limits on legacy cgroup system");
if (!ops->unified)
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment