Skip to content

Commit

Permalink
[PATCH] eligible_child: remove an obsolete ->tgid check
Browse files Browse the repository at this point in the history
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 <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Sep 2, 2006
1 parent d738752 commit 3b6362b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3b6362b

Please sign in to comment.