Re: [PATCH v2 03/17] signal: make may_ptrace_stop() return bool
From: Oleg Nesterov
Date: Fri Jun 01 2018 - 11:56:22 EST
On 06/01, Christian Brauner wrote:
>
> may_ptrace_stop() already behaves like a boolean function. Let's actually
> declare it as such too.
OK. Then probably this patch should only make it return bool and do nothing else?
> - if (unlikely(current->mm->core_state) &&
> - unlikely(current->mm == current->parent->mm))
> - return 0;
> + if (likely(!current->mm->core_state ||
> + current->mm != current->parent->mm))
> + return false;
this is wrong.
Oleg.