diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-06-24 11:34:39 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2011-06-27 14:30:11 -0400 |
commit | 479bf98c1c29b40d86e40a4e6e4944c2f03d9493 (patch) | |
tree | 259bda55b4e49d764e8768e5149f755c8897ab5c /kernel/exit.c | |
parent | bb3696da89743d580f869142d0a6e6ba9b7fe89a (diff) |
ptrace: wait_consider_task: s/same_thread_group/ptrace_reparented/
wait_consider_task() checks same_thread_group(parent, real_parent),
this is the open-coded ptrace_reparented().
__ptrace_detach() remains the only function which has to check this by
hand, although we could reorganize the code to delay __ptrace_unlink.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 9fa99702645d..b8d3b47bb881 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1599,8 +1599,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace, | |||
1599 | * own children, it should create a separate process which | 1599 | * own children, it should create a separate process which |
1600 | * takes the role of real parent. | 1600 | * takes the role of real parent. |
1601 | */ | 1601 | */ |
1602 | if (likely(!ptrace) && p->ptrace && | 1602 | if (likely(!ptrace) && p->ptrace && !ptrace_reparented(p)) |
1603 | same_thread_group(p->parent, p->real_parent)) | ||
1604 | return 0; | 1603 | return 0; |
1605 | 1604 | ||
1606 | /* | 1605 | /* |