]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/cgroup: make sure deserialized accounting data is not voided 39130/head
authorMike Yuan <me@yhndnzj.com>
Thu, 25 Sep 2025 20:28:33 +0000 (22:28 +0200)
committerMike Yuan <me@yhndnzj.com>
Thu, 25 Sep 2025 20:55:14 +0000 (22:55 +0200)
commit055a5a236c6776fa281890aa17972c6ed3a1132e
tree64e0a2797b503237b8d9c71197a06f593aa713e5
parente99f741cdf714c900fc6cafc53d19701ed6b02a1
core/cgroup: make sure deserialized accounting data is not voided

Currently, cgroup_path is (de-)serialized after all the cached
accounting data. This is bogus though, since unit_set_cgroup_path()
destroys the CGroupRuntime object and starts afresh, discarding
all deserialized values. This matters especially for IP accounting,
whose BPF maps get recreated on reload/reexec and the previous values
are exclusively retrievable from deserialization. Let's hence swap things
around and serialize cgroup_path first, accounting data only afterwards.
src/core/cgroup.c