chiark / gitweb /
core: when coming back from reload/reexec, reapply all cgroup properties
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Sep 2017 12:32:33 +0000 (14:32 +0200)
committerSven Eden <yamakuzure@gmx.net>
Thu, 7 Sep 2017 12:32:33 +0000 (14:32 +0200)
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.

src/core/cgroup.c

index 1d1e2d38ec1189fdbc23c5ee8ac7deb31872ed74..0ca80d9758007f01cbb6cc6971939baee6ec83ee 100644 (file)
@@ -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;