]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: get rid of cgroup_freezer_frozen_exit()
authorRoman Gushchin <guro@fb.com>
Fri, 26 Apr 2019 17:59:45 +0000 (10:59 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 6 May 2019 15:39:11 +0000 (08:39 -0700)
commitd3c145296c4d6ef7d55ee92f3a12a8690673b1d1
treee7e9f4f31aa3c2182de25d660aba59cf3325d4cd
parentb00688e705de2c1ff24dbda4b9eb3eeb4dcaaee7
cgroup: get rid of cgroup_freezer_frozen_exit()

A task should never enter the exit path with the task->frozen bit set.
Any frozen task must enter the signal handling loop and the only
way to escape is through cgroup_leave_frozen(true), which
unconditionally drops the task->frozen bit. So it means that
cgroyp_freezer_frozen_exit() has zero chances to be called and
has to be removed.

Let's put a WARN_ON_ONCE() instead of the cgroup_freezer_frozen_exit()
call to catch any potential leak of the task's frozen bit.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c
kernel/cgroup/freezer.c