libtirpc/libtirpc-0.1.10-dg-unlock.patch

30 lines
885 B
Diff
Raw Normal View History

commit 7c78a0362fcd3e0749330f11d0fdecb62131a6a3
Author: Steve Dickson <steved@redhat.com>
Date: Thu Nov 20 08:53:52 2008 -0500
The clnt_fd_lock mutex lock was not being
released during an error path in clnt_dg_call.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index da01c5b..9a574eb 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -402,6 +402,7 @@ get_reply:
fd.fd = cu->cu_fd;
fd.events = POLLIN;
+ fd.revents = 0;
while (total_time > 0) {
tv = total_time < nextsend_time ? total_time : nextsend_time;
switch (poll(&fd, 1, tv)) {
@@ -455,6 +456,7 @@ get_reply:
{
e = (struct sock_extended_err *) CMSG_DATA(cmsg);
cu->cu_error.re_errno = e->ee_errno;
+ release_fd_lock(cu->cu_fd, mask);
return (cu->cu_error.re_status = RPC_CANTRECV);
}
}