svn commit: r233028 - stable/9/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Fri Mar 16 10:59:05 UTC 2012
Author: kib
Date: Fri Mar 16 10:59:04 2012
New Revision: 233028
URL: http://svn.freebsd.org/changeset/base/233028
Log:
MFC r232947:
Lock the process around manipulations with p_flag.
Modified:
stable/9/sys/kern/kern_exit.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/kern/kern_exit.c
==============================================================================
--- stable/9/sys/kern/kern_exit.c Fri Mar 16 10:51:42 2012 (r233027)
+++ stable/9/sys/kern/kern_exit.c Fri Mar 16 10:59:04 2012 (r233028)
@@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc
LIST_REMOVE(p, p_list); /* off zombproc */
sx_xunlock(&allproc_lock);
LIST_REMOVE(p, p_sibling);
+ PROC_LOCK(p);
if (p->p_flag & P_ORPHAN) {
LIST_REMOVE(p, p_orphan);
p->p_flag &= ~P_ORPHAN;
}
+ PROC_UNLOCK(p);
leavepgrp(p);
#ifdef PROCDESC
if (p->p_procdesc != NULL)
More information about the svn-src-stable-9
mailing list