From owner-cvs-src@FreeBSD.ORG Sun Oct 19 13:47:41 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3800116A4B3; Sun, 19 Oct 2003 13:47:41 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-63-207-60-234.dsl.lsan03.pacbell.net [63.207.60.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id 182D743FE0; Sun, 19 Oct 2003 13:47:39 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id 9C11066DE1; Sun, 19 Oct 2003 13:47:38 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 7087CCDB; Sun, 19 Oct 2003 13:47:38 -0700 (PDT) Date: Sun, 19 Oct 2003 13:47:38 -0700 From: Kris Kennaway To: David Malone Message-ID: <20031019204738.GA49566@rot13.obsecurity.org> References: <200310192041.h9JKf712075632@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <200310192041.h9JKf712075632@repoman.freebsd.org> User-Agent: Mutt/1.4.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/streams streams.c src/sys/kern kern_descrip.c kern_event.c sys_pipe.c uipc_syscalls.c vfs_syscalls.c src/sys/opencrypto cryptodev.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2003 20:47:41 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 19, 2003 at 01:41:07PM -0700, David Malone wrote: > dwmalone 2003/10/19 13:41:07 PDT >=20 > FreeBSD src repository >=20 > Modified files: > sys/dev/streams streams.c=20 > sys/kern kern_descrip.c kern_event.c sys_pipe.c=20 > uipc_syscalls.c vfs_syscalls.c=20 > sys/opencrypto cryptodev.c=20 > Log: > falloc allocates a file structure and adds it to the file descriptor > table, acquiring the necessary locks as it works. It usually returns > two references to the new descriptor: one in the descriptor table > and one via a pointer argument. > =20 > As falloc releases the FILEDESC lock before returning, there is a > potential for a process to close the reference in the file descriptor > table before falloc's caller gets to use the file. I don't think this > can happen in practice at the moment, because Giant indirectly protects > closes. > =20 > To stop the file being completly closed in this situation, this change > makes falloc set the refcount to two when both references are returned. > This makes life easier for several of falloc's callers, because the > first thing they previously did was grab an extra reference on the > file. Does this fix the filedesc LORs that have been seen for the past few months? Kris --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/kvhqWry0BWjoQKURAhk+AJ0Szbm3cN/uIya15ptFvnFihPMA0ACdEkCf 1uhOkBBrZezzLed2J8sczXE= =Eywt -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--