summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-04-02 22:14:13 +0000
committeriedowse <iedowse@FreeBSD.org>2001-04-02 22:14:13 +0000
commite959f6cbeae94622dc70f9cd7eddf3351dfd8a78 (patch)
tree46a2e8e6401f4c62fdcf6b93576f96e362b29a6a /lib/libc/rpc
parentc7f3f4f6921573ef6761629ae1b756376e15cc3a (diff)
downloadFreeBSD-src-e959f6cbeae94622dc70f9cd7eddf3351dfd8a78.zip
FreeBSD-src-e959f6cbeae94622dc70f9cd7eddf3351dfd8a78.tar.gz
There were a few error cases where the RPC code would return with
all signals masked (whoops). Add the missing cleanup code. Reviewed by: Martin Blapp <mb@imp.ch>, alfred
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/clnt_dg.c4
-rw-r--r--lib/libc/rpc/clnt_vc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c
index 2b07755..3f6cfd4 100644
--- a/lib/libc/rpc/clnt_dg.c
+++ b/lib/libc/rpc/clnt_dg.c
@@ -681,8 +681,10 @@ clnt_dg_control(cl, request, info)
break;
case CLSET_SVC_ADDR: /* set to new address */
addr = (struct netbuf *)(void *)info;
- if (addr->len < sizeof cu->cu_raddr)
+ if (addr->len < sizeof cu->cu_raddr) {
+ release_fd_lock(cu->cu_fd, mask);
return (FALSE);
+ }
(void) memcpy(&cu->cu_raddr, addr->buf, addr->len);
cu->cu_rlen = addr->len;
break;
diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c
index 2a2fce8..df0d83c 100644
--- a/lib/libc/rpc/clnt_vc.c
+++ b/lib/libc/rpc/clnt_vc.c
@@ -231,12 +231,14 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
mutex_unlock(&clnt_fd_lock);
+ thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
goto err;
}
if (_connect(fd, (struct sockaddr *)raddr->buf, raddr->len) < 0){
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
mutex_unlock(&clnt_fd_lock);
+ thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
goto err;
}
}
OpenPOWER on IntegriCloud