Lock the process around manipulations with p_flag.
Reported and reviewed by: jh MFC after: 3 days
This commit is contained in:
parent
b1866dfea3
commit
7335ed90a0
@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc *p, int *status, int options,
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user