From 8186eb8e8a09d4d1c6b4902286a54cfcb1fb3edd Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 17 Feb 2021 16:23:20 +0100 Subject: [PATCH] cgroups: prevent cgroup mount type overwrite Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index a4c12d5cf..dbf6b9360 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1987,15 +1987,6 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, if (in_cgroup_ns && !wants_force_mount) return log_trace(true, "Mounting cgroups not requested or needed"); - /* - * Fallback to a mixed layout when the user did not specify what cgroup - * layout they want. - */ - if ((cg_flags & LXC_AUTO_CGROUP_NOSPEC)) - cg_flags = LXC_AUTO_CGROUP_MIXED; - else if (cg_flags & LXC_AUTO_CGROUP_FULL_NOSPEC) - cg_flags = LXC_AUTO_CGROUP_FULL_MIXED; - /* This is really the codepath that we want. */ if (pure_unified_layout(ops)) { __do_close int dfd_mnt_unified = -EBADF; -- 2.47.2