Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200AbaAWTed (ORCPT ); Thu, 23 Jan 2014 14:34:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2217 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753684AbaAWTe1 (ORCPT ); Thu, 23 Jan 2014 14:34:27 -0500 From: Richard Guy Briggs To: linux-audit@redhat.com, linux-kernel@vger.kernel.org Cc: Richard Guy Briggs , eparis@redhat.com, sgrubb@redhat.com, akpm@linux-foundation.org, peterz@infradead.org, oleg@redhat.com, "Eric W. Biederman" Subject: [PATCH 5/7] pid: rewrite task helper function is_global_init() avoiding task->pid Date: Thu, 23 Jan 2014 14:32:38 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the access function task_pid_nr() to get pid. (informed by ebiederman's ea5a4d01) Cc: "Eric W. Biederman" Signed-off-by: Richard Guy Briggs --- include/linux/sched.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index b4e658c..f60de19 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1615,7 +1615,7 @@ static inline int pid_alive(struct task_struct *p) */ static inline int is_global_init(struct task_struct *tsk) { - return tsk->pid == 1; + return task_pid_nr(tsk) == 1; } extern struct pid *cad_pid; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/