diff options
author | jhb <jhb@FreeBSD.org> | 2000-12-06 01:45:20 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-12-06 01:45:20 +0000 |
commit | f31d0140944777649798625457c6e38cdd5f4b33 (patch) | |
tree | cd47b6e4c9c3420638593565a1a5fe2d11b50582 /sys/coda/coda_vnops.c | |
parent | 92c9bab52b5aedd40f49ab45b2450cc7dd98e2f4 (diff) | |
download | FreeBSD-src-f31d0140944777649798625457c6e38cdd5f4b33.zip FreeBSD-src-f31d0140944777649798625457c6e38cdd5f4b33.tar.gz |
Protect accesses to member of struct proc with the proc lock.
Diffstat (limited to 'sys/coda/coda_vnops.c')
-rw-r--r-- | sys/coda/coda_vnops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index c2e6bcf..496b58b 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -431,7 +431,9 @@ coda_rdwr(vp, uiop, rw, ioflag, cred, p) * venus won't have the correct size of the core when * it's completely written. */ + PROC_LOCK(p); if (cp->c_inode != 0 && !(p && (p->p_acflag & ACORE))) { + PROC_UNLOCK(p); igot_internally = 1; error = coda_grab_vnode(cp->c_device, cp->c_inode, &cfvp); if (error) { @@ -445,6 +447,7 @@ coda_rdwr(vp, uiop, rw, ioflag, cred, p) VOP_UNLOCK(cfvp, 0, p); } else { + PROC_UNLOCK(p); opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), |