Check for PRS_NEW without locking the proc in sysctl_kern_proc
This commit is contained in:
parent
2cadb364c5
commit
4688365465
@ -1479,11 +1479,9 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
|
||||
/*
|
||||
* Skip embryonic processes.
|
||||
*/
|
||||
PROC_LOCK(p);
|
||||
if (p->p_state == PRS_NEW) {
|
||||
PROC_UNLOCK(p);
|
||||
if (p->p_state == PRS_NEW)
|
||||
continue;
|
||||
}
|
||||
PROC_LOCK(p);
|
||||
KASSERT(p->p_ucred != NULL,
|
||||
("process credential is NULL for non-NEW proc"));
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user