chiark / gitweb /
pid1: do not reset subtree_control on already-existing units with delegation
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 May 2018 10:19:09 +0000 (12:19 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commitacdec76cd5f000149d23e6f64f50e4332b84326c
tree2dac615d232fcdbf59908d54b0acc638e161d042
parenta6c19e8cc6f4e48f564a9a4d45872b11cd49374b
pid1: do not reset subtree_control on already-existing units with delegation

Fixes #8364.

Reproducer:
$ sudo systemd-run -t -p Delegate=yes bash
# mkdir /sys/fs/cgroup/system.slice/run-u6958.service/supervisor
# echo $$ > /sys/fs/cgroup/system.slice/run-u6958.service/supervisor/cgroup.procs
# echo +memory > /sys/fs/cgroup/system.slice/run-u6958.service/cgroup.subtree_control
# cat /sys/fs/cgroup/system.slice/run-u6958.service/cgroup.subtree_control
memory
# systemctl daemon-reload
# cat /sys/fs/cgroup/system.slice/run-u6958.service/cgroup.subtree_control
(empty)

With patch, the last command shows 'memory'.
src/basic/cgroup-util.c
src/core/cgroup.c