From: Yu Watanabe Date: Wed, 13 Aug 2025 01:38:53 +0000 (+0900) Subject: core/cgroup: allow to set cgroup path for frozen unit X-Git-Tag: v258-rc3~46^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b39815ebf7d415cd99049c72c7164d599f967aee;p=thirdparty%2Fsystemd.git core/cgroup: allow to set cgroup path for frozen unit Otherwise, after 'systemctl daemon-reload' or 'daemon-reexec', frozen units cannot gain cgroup paths and we cannot operate anything on them, especially, we cannot thaw or stop them. ``` Aug 12 16:26:09 systemd[1]: wd.service: Job 1278 wd.service/stop finished, result=frozen Aug 12 16:26:09 systemd[1]: Cannot stop frozen unit wd.service. Aug 12 16:26:09 systemd[1]: wd.service: Cannot realize cgroup for frozen unit. Aug 12 16:26:09 systemd[1]: Failed to realize cgroups for queued unit wd.service, ignoring: Device or resource busy ``` Follow-up for 23ac08115af83e3a0a937fa207fc52511aba2ffa. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index ce9c30fc6ed..48149e15bd5 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2088,9 +2088,6 @@ static int unit_update_cgroup( if (!UNIT_HAS_CGROUP_CONTEXT(u)) return 0; - if (u->freezer_state != FREEZER_RUNNING) - return log_unit_error_errno(u, SYNTHETIC_ERRNO(EBUSY), "Cannot realize cgroup for frozen unit."); - r = unit_get_cgroup_path_with_fallback(u, &cgroup); if (r < 0) return log_unit_error_errno(u, r, "Failed to get cgroup path: %m");