diff options
author | Roman Gushchin <guro@fb.com> | 2019-04-26 10:59:45 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-05-06 08:39:11 -0700 |
commit | 96b9c592def5d7203bdad1337d9c92a2183de5cb (patch) | |
tree | e7e9f4f31aa3c2182de25d660aba59cf3325d4cd /kernel/cgroup/freezer.c | |
parent | cb2c4cd87874a7975b7b8615866b3a87bae10aab (diff) |
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>
Diffstat (limited to 'kernel/cgroup/freezer.c')
-rw-r--r-- | kernel/cgroup/freezer.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/kernel/cgroup/freezer.c b/kernel/cgroup/freezer.c index c321e768f8d3..8cf010680678 100644 --- a/kernel/cgroup/freezer.c +++ b/kernel/cgroup/freezer.c @@ -248,16 +248,6 @@ void cgroup_freezer_migrate_task(struct task_struct *task, cgroup_freeze_task(task, test_bit(CGRP_FREEZE, &dst->flags)); } -void cgroup_freezer_frozen_exit(struct task_struct *task) -{ - struct cgroup *cgrp = task_dfl_cgroup(task); - - lockdep_assert_held(&css_set_lock); - - cgroup_dec_frozen_cnt(cgrp); - cgroup_update_frozen(cgrp); -} - void cgroup_freeze(struct cgroup *cgrp, bool freeze) { struct cgroup_subsys_state *css; |