From: Lennart Poettering Date: Thu, 7 Sep 2017 12:32:33 +0000 (+0200) Subject: core: when coming back from reload/reexec, reapply all cgroup properties X-Git-Tag: v235.1~94 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e5ff123fa4c23ed39685f8f8dc7f77f1627a81fd;p=elogind.git core: when coming back from reload/reexec, reapply all cgroup properties With this change we'll invalidate all cgroup settings after coming back from a daemon reload/reexec, so that the new settings are instantly applied. This is useful for the BPF case, because we don't serialize/deserialize the BPF program fd, and hence have to install a new, updated BPF program when coming back from the reload/reexec. However, this is also useful for the rest of the cgroup settings, as it ensures that user configuration really takes effect wherever we can. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 1d1e2d38e..0ca80d975 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1534,6 +1534,7 @@ static int unit_realize_cgroup_now(Unit *u, ManagerState state) { } static void unit_add_to_cgroup_queue(Unit *u) { + assert(u); if (u->in_cgroup_queue) return;