]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: init_tasks shouldn't be linked to the root cgroup
authorTejun Heo <tj@kernel.org>
Thu, 30 Jan 2020 16:37:33 +0000 (11:37 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 30 Jan 2020 16:37:33 +0000 (11:37 -0500)
commitdcc54176918aeb1cdb6f353813bf76db5ccd529f
treeeb96a2a3b8d55ecd4c96741eefd766c9d86c68e7
parent0a3b310f788fe79fd9a53d4c8e41c96333aec3ca
cgroup: init_tasks shouldn't be linked to the root cgroup

113294dd0816 ("cgroup: remove cgroup_enable_task_cg_lists()
optimization") removed lazy initialization of css_sets so that new
tasks are always lniked to its css_set. In the process, it incorrectly
ended up adding init_tasks to root css_set. They show up as PID 0's in
root's cgroup.procs triggering warnings in systemd and generally
confusing people.

Fix it by skip css_set linking for init_tasks.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: https://github.com/joanbm
Link: https://github.com/systemd/systemd/issues/14682
Fixes: 113294dd0816 ("cgroup: remove cgroup_enable_task_cg_lists() optimization")
Cc: stable@vger.kernel.org # v5.5+
kernel/cgroup/cgroup.c