filedesc: fix missed comments about fdsetugidsafety
While here just note that both fdsetugidsafety and fdcheckstd take sleepable locks.
This commit is contained in:
parent
6575d18476
commit
8a5177cca3
@ -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
|
||||
|
@ -688,10 +688,8 @@ do_execve(td, args, mac_p)
|
||||
* 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);
|
||||
|
Loading…
Reference in New Issue
Block a user