Another case where we need to guard against a partially

constructed process.

Submitted by: Stephan Uphoff ( ups at tree.com	)
MFC after:	3 days
This commit is contained in:
julian 2004-10-04 06:45:48 +00:00
parent c5f1195949
commit 395c906e95

View File

@ -2360,6 +2360,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
xf.xf_size = sizeof(xf);
sx_slock(&allproc_lock);
LIST_FOREACH(p, &allproc, p_list) {
if (p->p_state == PRS_NEW)
continue;
PROC_LOCK(p);
if (p_cansee(req->td, p) != 0) {
PROC_UNLOCK(p);