]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerEric Paris <eparis@redhat.com>
Thu, 20 Mar 2014 14:11:54 +0000 (10:11 -0400)
commit3d938172617f619f6794f3fb5651ef200c1dc1d8
tree695d01a5792f57356ed7c1b759ff781dabda5c22
parentcf182890f9f1ce94aa25b21ef444a8b507dae9c8
pid: get pid_t ppid of task in init_pid_ns

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: stable@vger.kernel.org
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
include/linux/sched.h