Messages in this thread | | | Date | Thu, 19 May 2011 18:44:02 +0200 | From | Tejun Heo <> | Subject | Re: [PATCH 09/10] ptrace: add JOBCTL_BLOCK_NOTIFY |
| |
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 doesn't end up calling ptrace_put_task_struct() but I think it would be better to keep the two tests there so that the function can be called regardless of what happened.
Thanks.
-- tejun
| |