From a69f1dd9ca2a8eb20bf75083a4199c8791d55bf8 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Wed, 13 Oct 2021 07:43:14 -0400 Subject: [PATCH] cgroup: when checking for legacy controllers, ignore any we don't care about --- src/shared/cgroup-setup.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */