From owner-freebsd-current@FreeBSD.ORG Fri Oct 1 14:49:08 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC7EC16A4CE; Fri, 1 Oct 2004 14:49:08 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD08343D48; Fri, 1 Oct 2004 14:49:08 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id B61D15C955; Fri, 1 Oct 2004 07:49:08 -0700 (PDT) Date: Fri, 1 Oct 2004 07:49:08 -0700 From: Alfred Perlstein To: Scott Long Message-ID: <20041001144908.GB13443@elvis.mu.org> References: <200410010741.i917fJUo076107@pooker.samsco.org> <20041001083144.GT39252@elvis.mu.org> <415D6A9E.5030903@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <415D6A9E.5030903@FreeBSD.org> User-Agent: Mutt/1.4.2.1i cc: re@FreeBSD.org cc: current@FreeBSD.org Subject: Re: 5.3-RELEASE TODO X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2004 14:49:08 -0000 * Scott Long [041001 07:33] wrote: > Alfred Perlstein wrote: > >>| | | | The LOR reported in | > >>| | | | PR kern/55175 needs | > >>| filedesc LOR | Not done | -- | to be fixed. | > >>| | | | Filedesc locking | > >>| | | | needs to be heavily | > >>| | | | reviewed in general. | > > > > > >Oy this thing... :) > > > >The only thing blocking this was that we need to access the filedesc > >as the process shuts down for nfs locks, Darwin has a workaround that > >I'll see if i can incorporate. > > > > Is this one still actually a problem? I haven't seen anyone complain > about it in months. Yes. :) in kern_descript.c:fdfree() we have this: /* * We are the last reference to the structure, so we can * safely assume it will not change out from under us. */ FILEDESC_UNLOCK(fdp); fpp = fdp->fd_ofiles; for (i = fdp->fd_lastfile; i-- >= 0; fpp++) { if (*fpp) (void) closef(*fpp, td); } /* XXX This should happen earlier. */ mtx_lock(&fdesc_mtx); td->td_proc->p_fd = NULL; mtx_unlock(&fdesc_mtx); Basically we have an unlocked access to the filedesc here. The "should happen earlier" refers to swapping the order of these two code blocks, but we can not because NFS locking currently requires that the filedesc be around until the very last file is released. I may be able to merge a fix from Darwin for this, but I'm waiting on an A-OK for it. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684