From: msizanoen1 Date: Wed, 7 Dec 2022 09:38:05 +0000 (+0700) Subject: core/slice: skip member units without realized cgroup during freeze or thaw X-Git-Tag: v253-rc1~330^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcb0878f7563df9701a4d066378995c0b7ec32be;p=thirdparty%2Fsystemd.git core/slice: skip member units without realized cgroup during freeze or thaw This ensures that services with `RemainAfterExit` but without any process running won't cause failure during freeze. --- diff --git a/src/core/slice.c b/src/core/slice.c index c453aa033e7..4824a300d07 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -381,6 +381,9 @@ static int slice_freezer_action(Unit *s, FreezerAction action) { } UNIT_FOREACH_DEPENDENCY(member, s, UNIT_ATOM_SLICE_OF) { + if (!member->cgroup_realized) + continue; + if (action == FREEZER_FREEZE) r = UNIT_VTABLE(member)->freeze(member); else