[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191009152136.GA19519@castle.dhcp.thefacebook.com>
Date: Wed, 9 Oct 2019 15:21:41 +0000
From: Roman Gushchin <guro@...com>
To: Oleg Nesterov <oleg@...hat.com>
CC: Tejun Heo <tj@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Richard Purdie <richard.purdie@...uxfoundation.org>,
Bruce Ashfield <bruce.ashfield@...il.com>
Subject: Re: [PATCH] cgroup: freezer: call cgroup_enter_frozen() with
preemption disabled in ptrace_stop()
On Wed, Oct 09, 2019 at 05:02:30PM +0200, Oleg Nesterov wrote:
> 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@...il.com>
> Fixes: 76f969e8948d ("cgroup: cgroup v2 freezer")
> Cc: stable@...r.kernel.org # v5.2+
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
> kernel/signal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 534fec2..f8eed86 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2205,8 +2205,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t
> */
> preempt_disable();
> read_unlock(&tasklist_lock);
> - preempt_enable_no_resched();
> cgroup_enter_frozen();
> + preempt_enable_no_resched();
Acked-by: Roman Gushchin <guro@...com>
Thank you!
Powered by blists - more mailing lists