summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs/procfs_dbregs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/miscfs/procfs/procfs_dbregs.c')
-rw-r--r--sys/miscfs/procfs/procfs_dbregs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_dbregs.c b/sys/miscfs/procfs/procfs_dbregs.c
index c7ad130..6d35da0 100644
--- a/sys/miscfs/procfs/procfs_dbregs.c
+++ b/sys/miscfs/procfs/procfs_dbregs.c
@@ -96,5 +96,10 @@ int
procfs_validdbregs(p)
struct proc *p;
{
- return ((p->p_flag & P_SYSTEM) == 0);
+ int valid;
+
+ PROC_LOCK(p);
+ valid = (p->p_flag & P_SYSTEM) == 0;
+ PROC_UNLOCK(p);
+ return (valid);
}
OpenPOWER on IntegriCloud