Re: ptracee data structures cleanup

2009-04-21 Thread Oleg Nesterov
On 04/20, Roland McGrath wrote: Afaics ptrace_attach() needs this lock only to pin -mm, no other other reasons. ptrace_traceme() doesn't need it at all. I'm pretty sure that -mm check is only meant to exclude kernel threads. It should check PF_KTHREAD now, Yes. But

Re: wait_task_zombie() EXIT_DEAD problems

2009-04-21 Thread Roland McGrath
IOW, 2 threads T1 and T2. T2 forks the child C. T1 ptraces C. C dies and becomes EXIT_ZOMBIE. It sends the notification to thread-group. Then, any thread does do_wait(). But since ptrace_reparented() = T we don't release C but send the notification again. This doesn't look right.