aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2011-11-09 17:15:51 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2011-11-09 17:15:51 +0000
commitc8997bf02ac41549392905cc4b2d7cbaa113c67e (patch)
tree1d0d681736cadd42702eb0ad1ed9912c4d51c96e /sys/fs/procfs
parentebd2498cdf87678657628731b6aecfe8295b6535 (diff)
Notes
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index 62651cb679083..4bfa06f2f43f4 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -113,12 +113,14 @@ procfs_doprocstatus(PFS_FILL_ARGS)
}
tdfirst = FIRST_THREAD_IN_PROC(p);
+ thread_lock(tdfirst);
if (tdfirst->td_wchan != NULL) {
KASSERT(tdfirst->td_wmesg != NULL,
("wchan %p has no wmesg", tdfirst->td_wchan));
wmesg = tdfirst->td_wmesg;
} else
wmesg = "nochan";
+ thread_unlock(tdfirst);
if (p->p_flag & P_INMEM) {
struct timeval start, ut, st;