Messages in this thread | | | Date | Wed, 11 May 2011 21:45:51 +0200 | From | Tejun Heo <> | Subject | Re: [PATCH 10/11] ptrace: move JOBCTL_TRAPPING wait to wait(2) and ptrace_check_attach() |
| |
Hello,
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.
Thanks.
-- tejun
| |