diff options
author | truckman <truckman@FreeBSD.org> | 2002-09-13 09:31:56 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2002-09-13 09:31:56 +0000 |
commit | 8172475ce1cd34373d669db96d930165b111c443 (patch) | |
tree | 2f92a8b1b5b9d3384ecc2cf92a714baec267854a /sys | |
parent | 6a8cbc1cb189fdc633d51faa23b4efe1db976384 (diff) | |
download | FreeBSD-src-8172475ce1cd34373d669db96d930165b111c443.zip FreeBSD-src-8172475ce1cd34373d669db96d930165b111c443.tar.gz |
Drop the proc lock while calling fdcheckstd() which may block to allocate
memory.
Reviewed by: jhb
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 8423f62..2ac4486 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -437,8 +437,15 @@ interpret: #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; /* |