summaryrefslogtreecommitdiffstats
path: root/src/shared/cgroup-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cgroup-setup.c')
-rw-r--r--src/shared/cgroup-setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
index aa5ee99ebf..2221fd07c2 100644
--- a/src/shared/cgroup-setup.c
+++ b/src/shared/cgroup-setup.c
@@ -63,6 +63,10 @@ static int cg_any_controller_used_for_v1(void) {
if (streq(enabled, "0"))
continue;
+ /* Ignore controllers we don't care about. */
+ if (cgroup_controller_from_string(name) < 0)
+ continue;
+
/* Since the unified cgroup doesn't use multiple hierarchies, if any controller has a
* non-zero hierarchy_id that means it's in use already in a legacy (or hybrid) cgroup v1
* hierarchy, and can't be used in a unified cgroup. */