]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: Don't GC unit if it is in cgroup_empty_queue
authorRichard Phibel <rphibel@googlemail.com>
Tue, 23 May 2023 14:09:40 +0000 (16:09 +0200)
committerRichard Phibel <rphibel@googlemail.com>
Mon, 29 May 2023 11:26:15 +0000 (13:26 +0200)
commit8db998981a4fefd0122bcf5f965726b63c9045c2
treee5f18a372f79edfe9ec36028374c567c457d8363
parente30b4c13570a5e4ec794d480d5371e9c739570d9
core: Don't GC unit if it is in cgroup_empty_queue

The gc_unit_queue is dispatched before the cgroup_empty_queue.  Because
of this, when we enter in on_cgroup_empty_event, the unit in
cgroup_empty_queue may already have been freed and we don't clean up the
corresponding cgroup. With this change, we prevent the unit from being
garbage collected if it is in the cgroup_empty_queue.
src/core/unit.c
test/units/testsuite-19.cleanup-slice.sh [new file with mode: 0755]