From 1bdd8ae4098794fb4e5bcd0ef0829f9b2f6d6e34 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Sat, 15 Feb 2003 08:25:57 +0000 Subject: [PATCH] Lock proc while accessing p_siglist, p_sigmask and p_sigignore in nfs_sigintr(). --- sys/nfsclient/nfs_socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index cdf7cf1460d..4391c7dbddb 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); }