Author: mjg
Date: Sun Dec 15 04:11:43 2013
New Revision: 259407
URL: http://svnweb.freebsd.org/changeset/base/259407
Log:
  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.
  
  MFC after:    2 weeks

Modified:
  head/sys/kern/kern_exit.c

Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c   Sun Dec 15 03:48:54 2013        (r259406)
+++ head/sys/kern/kern_exit.c   Sun Dec 15 04:11:43 2013        (r259407)
@@ -385,10 +385,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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to