From: Dan Streetman Date: Wed, 13 Oct 2021 11:43:14 +0000 (-0400) Subject: cgroup: when checking for legacy controllers, ignore any we don't care about X-Git-Tag: v250-rc1~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a69f1dd9ca2a8eb20bf75083a4199c8791d55bf8;p=thirdparty%2Fsystemd.git cgroup: when checking for legacy controllers, ignore any we don't care about --- diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c index aa5ee99ebfa..2221fd07c28 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. */