diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-07 02:07:56 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-07 02:07:56 +0000 |
commit | 6958204c78a2f8d8aeda75daa86f9a6502384a16 (patch) | |
tree | 52694f4fad9bdb6c487bfeb872e2c56458a0e0d8 /sys/miscfs | |
parent | 9629364e629777a1ac591d053bbdb16b2097ede3 (diff) | |
download | FreeBSD-src-6958204c78a2f8d8aeda75daa86f9a6502384a16.zip FreeBSD-src-6958204c78a2f8d8aeda75daa86f9a6502384a16.tar.gz |
Protect p_flag with the proc lock.
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_dbregs.c | 7 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_fpregs.c | 7 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_regs.c | 7 |
3 files changed, 18 insertions, 3 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); } diff --git a/sys/miscfs/procfs/procfs_fpregs.c b/sys/miscfs/procfs/procfs_fpregs.c index 69dd527..493939c 100644 --- a/sys/miscfs/procfs/procfs_fpregs.c +++ b/sys/miscfs/procfs/procfs_fpregs.c @@ -93,5 +93,10 @@ int procfs_validfpregs(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); } diff --git a/sys/miscfs/procfs/procfs_regs.c b/sys/miscfs/procfs/procfs_regs.c index c2b6d4b..d1dd0bc 100644 --- a/sys/miscfs/procfs/procfs_regs.c +++ b/sys/miscfs/procfs/procfs_regs.c @@ -94,5 +94,10 @@ int procfs_validregs(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); } |