[PATCH 1/5] pid: get pid_t ppid of task in init_pid_ns

2014-02-19 Thread Richard Guy Briggs
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 b

Re: [PATCH 1/5] pid: get pid_t ppid of task in init_pid_ns

2013-12-30 Thread Oleg Nesterov
On 12/23, Richard Guy Briggs wrote: > > +static inline pid_t task_ppid_nr_ns(struct task_struct *tsk, struct > pid_namespace *ns) > +{ > + pid_t pid; > + > + rcu_read_lock(); > + pid = pid_alive(tsk) ? > + task_pid_nr_ns(rcu_dereference(tsk->real_parent), ns) : 0; > + r

[PATCH 1/5] pid: get pid_t ppid of task in init_pid_ns

2013-12-23 Thread Richard Guy Briggs
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 b