diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-07 03:10:20 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-07 03:10:20 +0000 |
commit | 47cd1b179fe16d71d255d4a23882c155556f5040 (patch) | |
tree | 6594c35e846d77e4c98a8348c01eaf6918570882 /sys/fs/procfs/procfs_status.c | |
parent | 2c951b9c740f03ba39410bbbca30fa9fcc546a57 (diff) | |
download | FreeBSD-src-47cd1b179fe16d71d255d4a23882c155556f5040.zip FreeBSD-src-47cd1b179fe16d71d255d4a23882c155556f5040.tar.gz |
Protect read to p_pptr with proc lock rather than proctree lock.
Diffstat (limited to 'sys/fs/procfs/procfs_status.c')
-rw-r--r-- | sys/fs/procfs/procfs_status.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 7b2256c..40e3fbe 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -78,9 +78,9 @@ procfs_dostatus(curp, p, pfs, uio) return (EOPNOTSUPP); pid = p->p_pid; - PROCTREE_LOCK(PT_SHARED); + PROC_LOCK(p); ppid = p->p_pptr ? p->p_pptr->p_pid : 0; - PROCTREE_LOCK(PT_RELEASE); + PROC_UNLOCK(p); pgid = p->p_pgrp->pg_id; sess = p->p_pgrp->pg_session; sid = sess->s_leader ? sess->s_leader->p_pid : 0; |