Back out pseudo_vnops.c:1.45, which was a workaround for pfind()

returning incompletely initialized processes.  This problem was
eliminated by kern_proc.c:1.215, which causes pfind() not to
return processes in the PRS_NEW state.
This commit is contained in:
Robert Watson 2004-09-02 16:04:09 +00:00
parent eba7d78ea7
commit 10b7196db4

View File

@ -197,17 +197,6 @@ pfs_getattr(struct vop_getattr_args *va)
if (pvd->pvd_pid != NO_PID) {
if ((proc = pfind(pvd->pvd_pid)) == NULL)
PFS_RETURN (ENOENT);
/*
* XXX: pfind() returning incompletely allocated processes
* is probably a bug. Or, at least, we should check the
* process state, not the ucred pointer. Work around for
* now by checking that to avoid a possible NULL pointer
* dereference.
*/
if (proc->p_ucred == NULL) {
PROC_UNLOCK(proc);
PFS_RETURN (ENOENT);
}
vap->va_uid = proc->p_ucred->cr_ruid;
vap->va_gid = proc->p_ucred->cr_rgid;
if (pn->pn_attr != NULL)