Kirill Korotaev <dev at sw.ru> writes: > Cedric Le Goater wrote: >> Sukadev Bhattiprolu wrote: >> >> <snip> >> >>>@@ -620,8 +620,8 @@ static int de_thread(struct task_struct >>> * Reparenting needs write_lock on tasklist_lock, >>> * so it is safe to do it under read_lock. >>> */ >>>- if (unlikely(current->group_leader == child_reaper)) >>>- child_reaper = current; >>>+ if (unlikely(current->group->leader == current->pspace->child_reaper) >>>+ current->pspace->child_reaper = current; >>> >>> zap_other_threads(current); >>> read_unlock(&tasklist_lock); >> >> >> I'm unsure about this one ? > AFAICS, this one is for multithreaded init? > looks ok, imho. Correct except for the lack of nsproxy. The case to think about is when a multi-threaded init exec a process for a thread where pid != tgid. It prevents from having problems with an untrusted init process. Eric