cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop()
authorOleg Nesterov <oleg@redhat.com>
Wed, 9 Oct 2019 15:02:30 +0000 (17:02 +0200)
committerTejun Heo <tj@kernel.org>
Fri, 11 Oct 2019 15:39:57 +0000 (08:39 -0700)
commit937c6b27c73e02cd4114f95f5c37ba2c29fadba1
treee88382aa1b7c257d8c57c43f46a9298e83d0bcdd
parent9e208aa06c2109b45eec6be049a8e47034748c20
cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop()

ptrace_stop() does preempt_enable_no_resched() to avoid the preemption,
but after that cgroup_enter_frozen() does spin_lock/unlock and this adds
another preemption point.

Reported-and-tested-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Fixes: 76f969e8948d ("cgroup: cgroup v2 freezer")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/signal.c