summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-02-11 07:20:52 +0000
committeralfred <alfred@FreeBSD.org>2003-02-11 07:20:52 +0000
commit2cadfd181f08386b144b11c0ef669916a2b33608 (patch)
tree0b4d60f5c7204c9c0b7efeb849debf9ebd6bcd48 /sys/kern/kern_descrip.c
parent2f7dc73c5dc778ecc4e1ea46afa39804560cf504 (diff)
downloadFreeBSD-src-2cadfd181f08386b144b11c0ef669916a2b33608.zip
FreeBSD-src-2cadfd181f08386b144b11c0ef669916a2b33608.tar.gz
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.
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 140fb80..fe52ec1 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -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;
}
OpenPOWER on IntegriCloud