diff options
author | tjr <tjr@FreeBSD.org> | 2003-02-15 08:25:57 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-02-15 08:25:57 +0000 |
commit | a7cd813d68630d8fe743b644a3ace7471577eecf (patch) | |
tree | 6d98e4930f9fa510aef4cb7fee355a54d8b5a2be /sys | |
parent | 7a61ebe608e5cad2e4b3ab5d7310b7c5245e4b64 (diff) | |
download | FreeBSD-src-a7cd813d68630d8fe743b644a3ace7471577eecf.zip FreeBSD-src-a7cd813d68630d8fe743b644a3ace7471577eecf.tar.gz |
Lock proc while accessing p_siglist, p_sigmask and p_sigignore
in nfs_sigintr().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index cdf7cf1..4391c7d 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -1239,11 +1239,15 @@ nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct thread *td) return (0); p = td->td_proc; + PROC_LOCK(p); tmpset = p->p_siglist; SIGSETNAND(tmpset, p->p_sigmask); SIGSETNAND(tmpset, p->p_sigignore); - if (SIGNOTEMPTY(p->p_siglist) && NFSINT_SIGMASK(tmpset)) + if (SIGNOTEMPTY(p->p_siglist) && NFSINT_SIGMASK(tmpset)) { + PROC_UNLOCK(p); return (EINTR); + } + PROC_UNLOCK(p); return (0); } |