Drop the proc lock while calling fdcheckstd() which may block to allocate
memory. Reviewed by: jhb
This commit is contained in:
parent
92faa7b50f
commit
28b325aa60
@ -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;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user