Date: Sun, 19 Oct 2003 13:47:38 -0700 From: Kris Kennaway <kris@obsecurity.org> To: David Malone <dwmalone@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 Message-ID: <20031019204738.GA49566@rot13.obsecurity.org> In-Reply-To: <200310192041.h9JKf712075632@repoman.freebsd.org> References: <200310192041.h9JKf712075632@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031019204738.GA49566>