[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10/11] ptrace: move JOBCTL_TRAPPING wait to wait(2) and ptrace_check_attach()

On Wed, May 11, 2011 at 07:00:58PM +0200, Oleg Nesterov wrote:
> On 05/11, Oleg Nesterov wrote:
> >
> > You know, I'd wish I could find the serious bugs in this patch. The
> > code becomes really hairy. -EAGAIN in do_wait() doesn't make it more
> > simple ;)
> Mwahaha! I seem to see the bug ;)


> When the caller is do_wait(), we can't assume we are the tracer when
> we drop tasklist. Original tracer can detach, then another unrelated
> process can attach again and provoke JOBCTL_TRAPPING. wait_event()
> can hang forever.
> Unfortunately, this is easy to fix :/

Yeah, it's basically the same problem raised in other two patches.
Making wait interruptible and clearing pending stop/traps on
detach/kill/cont/whatever should do the trick. I'll reply the
previous message for the suggested change.



 \ /
  Last update: 2011-05-11 21:49    [W:0.140 / U:5.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site