cgroup fix for v5.6-rc1
Tejun Heo
maintainerHello, Linus.
I made a mistake while removing cgroup task list lazy init optimization making the root cgroup.procs show entries for the init_tasks. The 0 entries doesn't cause critical failures but does make systemd print out warning messages during boot. Fix it by omitting init_tasks as they should be.
Thanks.
The following changes since commit 39bed42de2e7d74686a2d5a45638d6a5d7e7d473:
Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma (2020-01-29 19:56:50 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-5.6-fixes
for you to fetch changes up to 0cd9d33ace336bc424fc30944aa3defd6786e4fe:
cgroup: init_tasks shouldn't be linked to the root cgroup (2020-01-30 11:37:33 -0500)
----------------------------------------------------------------
Tejun Heo (1):
cgroup: init_tasks shouldn't be linked to the root cgroup
kernel/cgroup/cgroup.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
kernel/cgroup/cgroup.c +8 -5
@@ -5932,11 +5932,14 @@ void cgroup_post_fork(struct task_struct *child)spin_lock_irq (&css_set_lock); -WARN_ON_ONCE (!list_empty (&child->cg_list)); - cset =task_css_set (current);/* current is @child's parent */ -get_css_set (cset); - cset->nr_tasks++; -css_set_move_task (child,NULL , cset, false); +/* init tasks are special, only link regular threads */ +if (likely (child->pid)) { +WARN_ON_ONCE (!list_empty (&child->cg_list)); + cset =task_css_set (current);/* current is @child's parent */ +get_css_set (cset); + cset->nr_tasks++; +css_set_move_task (child,NULL , cset, false); + }/* * If the cgroup has to be frozen, the new task has too. Let's set
The pull request you sent on Mon, 10 Feb 2020 17:55:12 -0500:
The pull request you sent on Mon, 10 Feb 2020 17:55:12 -0500:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.gitfor-5.6-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0a679e13ea30f85a1aef0669ee0c5a9fd7860b34
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker