]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cgroup: Include dying leaders with live threads in PROCS iterations
authorTejun Heo <tj@kernel.org>
Fri, 31 May 2019 17:38:58 +0000 (10:38 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commit798cc8800db87f35be63f8665426eb49daa79f28
tree5de5f0fea6879cc54e67e30b7923cf7b0773b89b
parent3995c283ae08dfadabbd89db47934dfa06606ead
cgroup: Include dying leaders with live threads in PROCS iterations

BugLink: https://bugs.launchpad.net/bugs/1840378
commit c03cd7738a83b13739f00546166969342c8ff014 upstream.

CSS_TASK_ITER_PROCS currently iterates live group leaders; however,
this means that a process with dying leader and live threads will be
skipped.  IOW, cgroup.procs might be empty while cgroup.threads isn't,
which is confusing to say the least.

Fix it by making cset track dying tasks and include dying leaders with
live threads in PROCS iteration.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-tested-by: Topi Miettinen <toiwoton@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/cgroup-defs.h
include/linux/cgroup.h
kernel/cgroup/cgroup.c