mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 14:44:10 +08:00
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>
This commit is contained in:
parent
bb3696da89
commit
479bf98c1c
@ -1599,8 +1599,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
|
|||||||
* own children, it should create a separate process which
|
* own children, it should create a separate process which
|
||||||
* takes the role of real parent.
|
* takes the role of real parent.
|
||||||
*/
|
*/
|
||||||
if (likely(!ptrace) && p->ptrace &&
|
if (likely(!ptrace) && p->ptrace && !ptrace_reparented(p))
|
||||||
same_thread_group(p->parent, p->real_parent))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user