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
Kris Kennaway
kris at obsecurity.org
Sun Oct 19 13:47:41 PDT 2003
On Sun, Oct 19, 2003 at 01:41:07PM -0700, David Malone wrote:
> dwmalone 2003/10/19 13:41:07 PDT
>
> FreeBSD src repository
>
> Modified files:
> sys/dev/streams streams.c
> sys/kern kern_descrip.c kern_event.c sys_pipe.c
> uipc_syscalls.c vfs_syscalls.c
> sys/opencrypto cryptodev.c
> 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.
>
> 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.
>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20031019/eb87c47c/attachment.bin
More information about the cvs-src
mailing list