summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c9
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;
/*
OpenPOWER on IntegriCloud