From owner-cvs-all Tue Feb 18 22:16:26 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2E4237B401; Tue, 18 Feb 2003 22:16:24 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CFEE43F93; Tue, 18 Feb 2003 22:16:24 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 15808AE255; Tue, 18 Feb 2003 22:16:24 -0800 (PST) Date: Tue, 18 Feb 2003 22:16:24 -0800 From: Alfred Perlstein To: Scott Long Cc: cvs-all@freebsd.org, src-committers@freebsd.org Subject: Re: [Fwd: [alfred@FreeBSD.org: cvs commit: src/sys/kern kern_descrip.c kern_event.c kern_exit.c vfs_mount.c src/sys/sys filedesc.h]] Message-ID: <20030219061624.GN93252@elvis.mu.org> References: <3E530BA1.8040407@btc.adaptec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E530BA1.8040407@btc.adaptec.com> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Scott Long [030218 20:44] wrote: > > > alfred 2003/02/14 21:52:56 PST > > > > Modified files: > > sys/kern kern_descrip.c kern_event.c kern_exit.c > > vfs_mount.c > > sys/sys filedesc.h > > Log: > > Fix LOR with PROC/filedesc. Introduce fdesc_mtx that will be used > > as a barrier between free'ing filedesc structures. Basically if > > you want to access another process's filedesc, you want to hold > > this mutex over the entire operation. > > > > Revision Changes Path > > 1.186 +11 -1 src/sys/kern/kern_descrip.c > > 1.55 +1 -1 src/sys/kern/kern_event.c > > 1.194 +1 -1 src/sys/kern/kern_exit.c > > 1.101 +3 -3 src/sys/kern/vfs_mount.c > > 1.50 +2 -0 src/sys/sys/filedesc.h > > The change in kern_descrip.c has a side effect of breaking the > nvidia.ko driver and diskless workstations that are NFS mounted > and have rpc.lockd enabled. The problem is that td->td_proc->p_fd > is set to null before closef(*fpp, td) is called. The patch below > fixes this and doesn't cause any locking issues that I can tell: The patch below will not probably not work. The reason is that it NULL's out the p->p_fd after the filedesc is manipulated without locks. Please explain how and why nfs and nvidia are broken. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message