Drop the proc lock while calling fdcheckstd() which may block to allocate

memory.

Reviewed by:	jhb
This commit is contained in:
Don Lewis 2002-09-13 09:31:56 +00:00
parent 92faa7b50f
commit 28b325aa60
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103277

View File

@ -437,8 +437,15 @@ execve(td, uap)
#endif
/* Close any file descriptors 0..2 that reference procfs */
setugidsafety(td);
/* Make sure file descriptors 0..2 are in use. */
/*
* Make sure file descriptors 0..2 are in use.
*
* fdcheckstd() may call falloc() which may block to
* allocate memory, so temporarily drop the process lock.
*/
PROC_UNLOCK(p);
error = fdcheckstd(td);
PROC_LOCK(p);
if (error != 0)
goto done1;
/*