summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-02-14 09:16:43 +0000
committertjr <tjr@FreeBSD.org>2003-02-14 09:16:43 +0000
commit8a9c700ec3e6aaf6ea3584e7a9e2b5d800274956 (patch)
tree46631bda7a4136c7906e12c196a6707988e5c46f /sys/netncp
parent9696379ec26cd3b35319dad2ba50064203c57f97 (diff)
downloadFreeBSD-src-8a9c700ec3e6aaf6ea3584e7a9e2b5d800274956.zip
FreeBSD-src-8a9c700ec3e6aaf6ea3584e7a9e2b5d800274956.tar.gz
Lock proc while accessing p_siglist p_sigmask and p_sigignore.
Not tested because netncp does not compile.
Diffstat (limited to 'sys/netncp')
-rw-r--r--sys/netncp/ncp_ncp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netncp/ncp_ncp.c b/sys/netncp/ncp_ncp.c
index 613c2d0..911dd82 100644
--- a/sys/netncp/ncp_ncp.c
+++ b/sys/netncp/ncp_ncp.c
@@ -80,11 +80,15 @@ ncp_chkintr(struct ncp_conn *conn, struct proc *p)
if (p == NULL)
return 0;
+ PROC_LOCK(p);
tmpset = p->p_siglist;
SIGSETNAND(tmpset, p->p_sigmask);
SIGSETNAND(tmpset, p->p_sigignore);
- if (SIGNOTEMPTY(p->p_siglist) && NCP_SIGMASK(tmpset))
+ if (SIGNOTEMPTY(p->p_siglist) && NCP_SIGMASK(tmpset)) {
+ PROC_UNLOCK(p);
return EINTR;
+ }
+ PROC_UNLOCK(p);
return 0;
}
OpenPOWER on IntegriCloud