Date: Mon, 7 Nov 2011 21:09:04 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227315 - head/sys/kern Message-ID: <201111072109.pA7L94JR096474@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Mon Nov 7 21:09:04 2011 New Revision: 227315 URL: http://svn.freebsd.org/changeset/base/227315 Log: In lim_fork() assert that processes locks are held. Suggested by: kib Modified: head/sys/kern/kern_resource.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Mon Nov 7 19:57:42 2011 (r227314) +++ head/sys/kern/kern_resource.c Mon Nov 7 21:09:04 2011 (r227315) @@ -1118,6 +1118,10 @@ lim_hold(limp) void lim_fork(struct proc *p1, struct proc *p2) { + + PROC_LOCK_ASSERT(p1, MA_OWNED); + PROC_LOCK_ASSERT(p2, MA_OWNED); + p2->p_limit = lim_hold(p1->p_limit); callout_init_mtx(&p2->p_limco, &p2->p_mtx, 0); if (p1->p_cpulimit != RLIM_INFINITY)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111072109.pA7L94JR096474>