Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task->pid and task->tgid

2013-08-22 Thread Richard Guy Briggs
On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: > On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: > > This stops these four task helper functions from using the deprecated and > > error-prone task->pid and task->tgid. > > > > (informed by ebiederman's ea5a4d01)

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task->pid and task->tgid

2013-08-22 Thread Peter Zijlstra
On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: > This stops these four task helper functions from using the deprecated and > error-prone task->pid and task->tgid. > > (informed by ebiederman's ea5a4d01) > Cc: "Eric W. Biederman" > Signed-off-by: Richard Guy Briggs > --- > i

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task->pid and task->tgid

2013-08-22 Thread Oleg Nesterov
On 08/20, Richard Guy Briggs wrote: > > static inline int is_global_init(struct task_struct *tsk) > { > - return tsk->pid == 1; > + return task_pid_nr(tsk) == 1; > } Probably it would be better to simply kill it. Almost every usage is wrong. > static inline bool is_idle_task(const str