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_psdev.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_psdev.c')
-rw-r--r-- | sys/coda/coda_psdev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/coda/coda_psdev.c b/sys/coda/coda_psdev.c index 7d31eb8..18fda00 100644 --- a/sys/coda/coda_psdev.c +++ b/sys/coda/coda_psdev.c @@ -488,7 +488,7 @@ coda_call(mntinfo, inSize, outSize, buffer) int error; #ifdef CTL_C struct proc *p = curproc; - sigset_t psig_omask = p->p_sigmask; + sigset_t psig_omask; sigset_t tempset; int i; #endif @@ -544,8 +544,10 @@ coda_call(mntinfo, inSize, outSize, buffer) can not do this. A better solution is necessary. */ i = 0; + PROC_LOCK(p); + psig_omask = p->p_sigmask; do { - error = tsleep(&vmp->vm_sleep, + error = msleep(&vmp->vm_sleep, &p->p_mtx, (coda_call_sleep|coda_pcatch), "coda_call", hz*2); if (error == 0) @@ -597,6 +599,7 @@ coda_call(mntinfo, inSize, outSize, buffer) } } while (error && i++ < 128 && VC_OPEN(vcp)); p->p_sigmask = psig_omask; + PROC_UNLOCK(p); #else (void) tsleep(&vmp->vm_sleep, coda_call_sleep, "coda_call", 0); #endif |