summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-17 22:14:30 +0000
committerjhb <jhb@FreeBSD.org>2003-04-17 22:14:30 +0000
commit92bdce0b6115b6f8a551f9451023bdce1755e247 (patch)
tree627be25420f8961ecf11c55918ccf6efaeb7572c /sys/fs
parentd4a3f193d097486ec8da30c49e330f5b5c5b12db (diff)
downloadFreeBSD-src-92bdce0b6115b6f8a551f9451023bdce1755e247.zip
FreeBSD-src-92bdce0b6115b6f8a551f9451023bdce1755e247.tar.gz
Protect p_flag with the proc lock. The sched_lock is not needed to turn
off P_STOPPED_SIG in p_flag.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c
index 6727040..ff4fb0a 100644
--- a/sys/fs/procfs/procfs_ctl.c
+++ b/sys/fs/procfs/procfs_ctl.c
@@ -263,8 +263,8 @@ out:
* or some other trap.
*/
case PROCFS_CTL_RUN:
- PROC_UNLOCK(p);
p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */
+ PROC_UNLOCK(p);
break;
/*
@@ -349,9 +349,9 @@ procfs_doprocctl(PFS_FILL_ARGS)
/* XXXKSE: */
FIX_SSTEP(FIRST_THREAD_IN_PROC(p));
#endif
- mtx_lock_spin(&sched_lock);
/* XXXKSE: */
p->p_flag &= ~P_STOPPED_SIG;
+ mtx_lock_spin(&sched_lock);
thread_unsuspend(p);
mtx_unlock_spin(&sched_lock);
} else
OpenPOWER on IntegriCloud