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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 Apr 2014 15:23:23 +0000 (16:23 +0100)
commit0ce844aea64b8bff202676fd87f2932b3eb35b83
treec13d0fce29ad4e84397a202af323d38c371f51b9
parent209e1b813d01a0a6fe12cecc9e15dbf40cdf12ad
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: Ben Hutchings <ben@decadent.org.uk>
include/linux/sched.h