freebsd-skq/sys/opencrypto
dwmalone be405a4cbd 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.

Reviewed by:	iedowse
Idea run past:	jhb
2003-10-19 20:41:07 +00:00
..
cast.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
cast.h
castsb.h
criov.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
crmbuf.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
crypto_if.m
crypto.c consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
cryptodev.c falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
cryptodev.h consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
cryptosoft.c Add support to eliminate a context switch per crypto op when using the 2003-06-27 20:07:10 +00:00
cryptosoft.h
deflate.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
deflate.h
rijndael.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
rijndael.h
rmd160.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
rmd160.h
skipjack.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
skipjack.h
xform.c Use __FBSDID(). 2003-06-11 05:57:50 +00:00
xform.h