diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 7450a89c2b5a..faaa114151c7 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2088,7 +2088,7 @@ fdescfree(struct thread *td) * otherwise be off-limits to the process. We check for filesystems where * the vnode can change out from under us after execve (like [lin]procfs). * - * Since setugidsafety calls this only for fd 0, 1 and 2, this check is + * Since fdsetugidsafety calls this only for fd 0, 1 and 2, this check is * sufficient. We also don't check for setugidness since we know we are. */ static bool diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 45d4c6f81764..7ae7d4ee5203 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -688,10 +688,8 @@ interpret: * Close any file descriptors 0..2 that reference procfs, * then make sure file descriptors 0..2 are in use. * - * setugidsafety() may call closef() and then pfind() - * which may grab the process lock. - * fdcheckstd() may call falloc() which may block to - * allocate memory, so temporarily drop the process lock. + * Both fdsetugidsafety() and fdcheckstd() may call functions + * taking sleepable locks, so temporarily drop our locks. */ PROC_UNLOCK(p); VOP_UNLOCK(imgp->vp, 0);