pid: get pid_t ppid of task in init_pid_ns
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 15 Aug 2013 22:05:12 +0000 (18:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 May 2014 20:20:27 +0000 (13:20 -0700)
commit6960029959f333bed9b0690c58429256fddd0a17
tree247ddca837ad920bb4896d59667ecbf528923567
parentbe57abca400415c343a251053db2ba8e8cf873ad
pid: get pid_t ppid of task in init_pid_ns

commit ad36d28293936b03d6b7996e9d6aadfd73c0eb08 upstream.

Added the functions task_ppid_nr_ns() and task_ppid_nr() to abstract the lookup
of the PPID (real_parent's pid_t) of a process, including rcu locking, in the
arbitrary and init_pid_ns.
This provides an alternative to sys_getppid(), which is relative to the child
process' pid namespace.

(informed by ebiederman's 6c621b7e)
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sched.h