Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751930Ab3HTVeS (ORCPT ); Tue, 20 Aug 2013 17:34:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39367 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816Ab3HTVdo (ORCPT ); Tue, 20 Aug 2013 17:33:44 -0400 From: Richard Guy Briggs To: linux-audit@redhat.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Cc: Richard Guy Briggs , Eric Paris , Al Viro , Ingo Molnar , Peter Zijlstra , "Serge E. Hallyn" , John Johansen , James Morris , Andrew Morton , Oleg Nesterov , Kentaro Takeda , Tetsuo Handa , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 10/12] pid: modify task_tgid_nr to work without task->tgid. Date: Tue, 20 Aug 2013 17:32:02 -0400 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 Content-Length: 1002 Lines: 30 task->tgid is an error prone construct and results in duplicate maintenance. Start it's demise by modifying task_tgid_nr to not use it. 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 fb09b93..8e69807 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1495,7 +1495,7 @@ static inline pid_t task_pid_vnr(struct task_struct *tsk) static inline pid_t task_tgid_nr(struct task_struct *tsk) { - return tsk->tgid; + return pid_nr(task_tgid(tsk)); } pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); -- 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/