lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/10] ptrace: add JOBCTL_BLOCK_NOTIFY
On Thu, May 19, 2011 at 06:48:33PM +0200, Oleg Nesterov wrote:
> On 05/19, Tejun Heo wrote:
> >
> > Hello,
> >
> > On Thu, May 19, 2011 at 06:32:33PM +0200, Oleg Nesterov wrote:
> > > > + /*
> > > > + * Make sure @chlid is still ptraced by us and clear BLOCK_NOTIFY.
> > > > + */
> > > > + if (likely((child->ptrace & PT_PTRACED) && child->parent == current))
> > >
> > > This looks a bit confusing... It is either traced or not. If it is traced,
> > > nobody else can trace it. In fact even PT_PTRACED is not strictly needed
> > > but I agree this check makes the code cleaner.
> >
> > Hmmm... I suppose we can make the error paths finer grained so that
> > attach failure
>
> Ah, you are right again, I forgot about PTRACE_ATTACH path.

We can move the PT_PTRACED and parenthood test outside the siglock tho
and I agree that the 'still ptraced' comment is misleading. I'll
update it.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-05-19 19:01    [W:0.085 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site