summaryrefslogtreecommitdiff
path: root/sys/fs/procfs/procfs_ctl.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-07-29 18:33:32 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-07-29 18:33:32 +0000
commit1d7b9ed2e6830e5d28f73f75e75aa235d40a65f4 (patch)
treefb17cadef050bebf8077e451640f625b2317869b /sys/fs/procfs/procfs_ctl.c
parent49545b3891a707a543faab07822d56d86c4ee73c (diff)
Notes
Diffstat (limited to 'sys/fs/procfs/procfs_ctl.c')
-rw-r--r--sys/fs/procfs/procfs_ctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c
index 15ed7189d6ff..88ce6ddee384 100644
--- a/sys/fs/procfs/procfs_ctl.c
+++ b/sys/fs/procfs/procfs_ctl.c
@@ -144,7 +144,9 @@ procfs_control(struct thread *td, struct proc *p, int op)
* Stop the target.
*/
p->p_flag |= P_TRACED;
+ mtx_lock_spin(&sched_lock);
faultin(p);
+ mtx_unlock_spin(&sched_lock);
p->p_xstat = 0; /* XXX ? */
if (p->p_pptr != td->td_proc) {
p->p_oppid = p->p_pptr->p_pid;