Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750766AbWA2JTo (ORCPT ); Sun, 29 Jan 2006 04:19:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750800AbWA2JTo (ORCPT ); Sun, 29 Jan 2006 04:19:44 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:37088 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S1750766AbWA2JTn (ORCPT ); Sun, 29 Jan 2006 04:19:43 -0500 To: Suleiman Souhlal Cc: linux-kernel@vger.kernel.org, vserver@list.linux-vserver.org, Herbert Poetzl , "Serge E. Hallyn" , Alan Cox , Dave Hansen , Arjan van de Ven , Hubertus Franke , Cedric Le Goater , Kyle Moffett Subject: Re: [PATCH 5/5] file: Modify struct fown_struct to contain a tref References: <43DC804B.4060900@FreeBSD.org> From: ebiederm@xmission.com (Eric W. Biederman) Date: Sun, 29 Jan 2006 02:18:28 -0700 In-Reply-To: <43DC804B.4060900@FreeBSD.org> (Suleiman Souhlal's message of "Sun, 29 Jan 2006 00:43:55 -0800") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 977 Lines: 30 Suleiman Souhlal writes: > Eric W. Biederman wrote: > >> @@ -317,7 +326,9 @@ static long do_fcntl(int fd, unsigned in >> * current syscall conventions, the only way >> * to fix this will be in libc. >> */ >> - err = filp->f_owner.pid; >> + err = 0; >> + if (filp->f_owner.tref->task) >> + err = filp->f_owner.pid; > > Probably not very important, but why don't you use > filp->f_owner.tref->task->pid? This way you could completely get rid of the pid > field in fown_struct. Two reasons. One because task->pid is not the proper value for a thread group. And because task might be NULL. Basically using filp->f_owner.tref->task->pid as my source is a much more complicated expression. Eric - 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/