lkml.org 
[lkml]   [2018]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/17] signal: make may_ptrace_stop() return bool
On Fri, Jun 01, 2018 at 05:56:12PM +0200, Oleg Nesterov wrote:
> 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.

This was a suggestion by Al. I just took it over and may have messed it
up while doing so. I'll remove this.

Christian

\
 
 \ /
  Last update: 2018-06-01 18:01    [W:0.095 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site