e1419c08e2
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 |
||
---|---|---|
.. | ||
cast.c | ||
cast.h | ||
castsb.h | ||
criov.c | ||
crmbuf.c | ||
crypto_if.m | ||
crypto.c | ||
cryptodev.c | ||
cryptodev.h | ||
cryptosoft.c | ||
cryptosoft.h | ||
deflate.c | ||
deflate.h | ||
rijndael.c | ||
rijndael.h | ||
rmd160.c | ||
rmd160.h | ||
skipjack.c | ||
skipjack.h | ||
xform.c | ||
xform.h |