summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2010-05-10 15:19:12 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2010-05-10 15:19:12 +0000
commitc3fd23a2dc634b283599bb1179b25e87f146dda0 (patch)
tree9c0ff39008b2f675e34709ba074046969173f87e
parent53731b3c4414d966831f5e40b526c3b1f6ae1f75 (diff)
Notes
-rw-r--r--sys/fs/procfs/procfs_ctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c
index 69e40a0a98fb..5980ce179ece 100644
--- a/sys/fs/procfs/procfs_ctl.c
+++ b/sys/fs/procfs/procfs_ctl.c
@@ -236,7 +236,6 @@ out:
PROC_LOCK(p);
p->p_oppid = 0;
p->p_flag &= ~P_WAITED; /* XXX ? */
- PROC_UNLOCK(p);
sx_xunlock(&proctree_lock);
wakeup(td->td_proc); /* XXX for CTL_WAIT below ? */
@@ -249,9 +248,10 @@ out:
*/
case PROCFS_CTL_STEP:
error = proc_sstep(FIRST_THREAD_IN_PROC(p));
- PROC_UNLOCK(p);
- if (error)
+ if (error) {
+ PROC_UNLOCK(p);
return (error);
+ }
break;
/*
@@ -260,7 +260,6 @@ out:
*/
case PROCFS_CTL_RUN:
p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */
- PROC_UNLOCK(p);
break;
/*
@@ -292,6 +291,7 @@ out:
PROC_SLOCK(p);
thread_unsuspend(p); /* If it can run, let it do so. */
PROC_SUNLOCK(p);
+ PROC_UNLOCK(p);
return (0);
}