MFC r259407:

proc exit: don't take PROC_LOCK while freeing rlimits

Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.
This commit is contained in:
mjg 2014-08-17 07:05:30 +00:00
parent ce59684e4d
commit 8a70582e79

View File

@ -387,10 +387,8 @@ exit1(struct thread *td, int rv)
/*
* Release our limits structure.
*/
PROC_LOCK(p);
plim = p->p_limit;
p->p_limit = NULL;
PROC_UNLOCK(p);
lim_free(plim);
tidhash_remove(td);