In sysctl_kern_proc_ps_strings() there is no much sense in checking

for P_WEXIT and P_SYSTEM flags.

Reviewed by:	kib
This commit is contained in:
Mikolaj Golub 2011-12-04 21:24:01 +00:00
parent d8e8af3166
commit 0f60ecdaa4

View File

@ -2456,18 +2456,10 @@ sysctl_kern_proc_ps_strings(SYSCTL_HANDLER_ARGS)
p = pfind((pid_t)name[0]);
if (p == NULL)
return (ESRCH);
if (p->p_flag & P_WEXIT) {
PROC_UNLOCK(p);
return (ESRCH);
}
if ((error = p_cansee(curthread, p)) != 0) {
PROC_UNLOCK(p);
return (error);
}
if ((p->p_flag & P_SYSTEM) != 0) {
PROC_UNLOCK(p);
return (0);
}
#ifdef COMPAT_FREEBSD32
if ((req->flags & SCTL_MASK32) != 0) {
/*