From: Oleg Nesterov Date: Fri, 24 Jun 2011 15:34:39 +0000 (+0200) Subject: ptrace: wait_consider_task: s/same_thread_group/ptrace_reparented/ X-Git-Tag: firefly_0821_release~3680^2~5000^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=479bf98c1c29b40d86e40a4e6e4944c2f03d9493;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Tejun Heo --- 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, * own children, it should create a separate process which * takes the role of real parent. */ - if (likely(!ptrace) && p->ptrace && - same_thread_group(p->parent, p->real_parent)) + if (likely(!ptrace) && p->ptrace && !ptrace_reparented(p)) return 0; /*