forget_original_parent: split out the un-ptrace part
authorOleg Nesterov <oleg@redhat.com>
Thu, 2 Apr 2009 23:58:18 +0000 (16:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:05:00 +0000 (19:05 -0700)
commit39c626ae47c469abdfd30c6e42eff884931380d6
tree58cbe75bac79ce8ef55c94189df26448d0283918
parent7f5d3652d469cdf9eb2365dfea7ce3fb9e1409cc
forget_original_parent: split out the un-ptrace part

By discussion with Roland.

- Rename ptrace_exit() to exit_ptrace(), and change it to do all the
  necessary work with ->ptraced list by its own.

- Move this code from exit.c to ptrace.c

- Update the comment in ptrace_detach() to explain the rechecking of
  the child->ptrace.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/ptrace.h
include/linux/sched.h
kernel/exit.c
kernel/ptrace.c