From: Oleg Nesterov Date: Sat, 2 Sep 2006 17:22:16 +0000 (+0400) Subject: [PATCH] eligible_child: remove an obsolete ->tgid check X-Git-Tag: v6.6-pxa1908~58800 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3b6362b833b9f7a9d4222cf1bb35f99c411abb31;p=linux.git [PATCH] eligible_child: remove an obsolete ->tgid check It is not possible to find a sub-thread in ->children/->ptrace_children lists, ptrace_attach() does not allow to attach to sub-threads. Even if it was possible to ptrace the task from the same thread group, we can't allow to release ->group_leader while there are others (ptracer) threads in the same group. Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds --- diff --git a/kernel/exit.c b/kernel/exit.c index a4c19a52ce46..d891883420f7 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1053,7 +1053,7 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p) * Do not consider thread group leaders that are * in a non-empty thread group: */ - if (current->tgid != p->tgid && delay_group_leader(p)) + if (delay_group_leader(p)) return 2; if (security_task_wait(p))