Don't lock FILEDESC under PROC.

The locking here needs to be revisited, but this ought to get rid of the
LOR messages that people are complaining about for now.  I imagine either
I or someone else interested with smp will eventually clear this up.
This commit is contained in:
Alfred Perlstein 2003-02-11 07:20:52 +00:00
parent 026e70f330
commit 42e1b74af2

View file

@ -2104,8 +2104,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
PROC_LOCK(p);
xf.xf_pid = p->p_pid;
xf.xf_uid = p->p_ucred->cr_uid;
PROC_UNLOCK(p);
if ((fdp = p->p_fd) == NULL) {
PROC_UNLOCK(p);
continue;
}
FILEDESC_LOCK(fdp);
@ -2125,7 +2125,6 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
break;
}
FILEDESC_UNLOCK(fdp);
PROC_UNLOCK(p);
if (error)
break;
}