From: Chris Down Date: Wed, 13 May 2026 12:25:08 +0000 (+0900) Subject: core: do not leak resources when handling stale alias state on reload (#41986) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c301966df770962d2fce4baba51214073d192d45;p=thirdparty%2Fsystemd.git core: do not leak resources when handling stale alias state on reload (#41986) The fix for the corrupted state when units become aliased on reload leaks the now-aliased unit's resources, which become untracked and essentially lost. While fixing the state corruption is of course necessary, leaking processes/etc. is not ideal for a system and service manager, so instead attempt to keep track of them by creating stub units on-the-fly. This way resources are not leaked, there are clear indications of where they moved, and all state can be tracked as expected. --- c301966df770962d2fce4baba51214073d192d45 diff --cc src/core/manager-serialize.c index 528540e57e2,7c557b2f3ff..9a64be40397 --- a/src/core/manager-serialize.c +++ b/src/core/manager-serialize.c @@@ -1,7 -1,8 +1,9 @@@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ + #include "sd-id128.h" + #include "alloc-util.h" +#include "bpf-restrict-fsaccess.h" #include "dbus.h" #include "dynamic-user.h" #include "fd-util.h"