Re: ptrace warning due to "cgroup: get rid of cgroup_freezer_frozen_exit()"
From: Qian Cai
Date: Wed May 08 2019 - 09:11:25 EST
On Tue, 2019-05-07 at 21:37 +0000, Roman Gushchin wrote:
> Can you, please, try if the following patch fixes the problem?
It works great.
> --
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 16b72f4f14df..bf2f268f1386 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2484,9 +2484,6 @@ bool get_signal(struct ksignal *ksig)
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsigdelset(¤t->pending.signal, SIGKILL);
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂrecalc_sigpending();
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcurrent->jobctl &= ~JOBCTL_TRAP_FREEZE;
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂspin_unlock_irq(&sighand->siglock);
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂif (unlikely(cgroup_task_frozen(current)))
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcgroup_leave_frozen(true);
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂgoto fatal;
> ÂÂÂÂÂÂÂÂ}
> Â
> @@ -2608,8 +2605,10 @@ bool get_signal(struct ksignal *ksig)
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcontinue;
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
> Â
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂspin_unlock_irq(&sighand->siglock);
> ÂÂÂÂÂÂÂÂfatal:
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂspin_unlock_irq(&sighand->siglock);
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂif (unlikely(cgroup_task_frozen(current)))
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcgroup_leave_frozen(true);
> Â
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ* Anything else is fatal, maybe with a core dump.