summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch')
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch b/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
deleted file mode 100644
index 50613ba312..0000000000
--- a/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Subject: [PATCH] Add missing rwlock_unlocks in xprt_register
2
3It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run
4switched to poll, an early return was added, but the rwlock was not
5unlocked.
6
7I observed that rpcbind built against libtirpc-1.0.1 would handle only
8one request before hanging, and tracked it down to a missing
9rwlock_unlock here.
10
11Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()')
12
13Upstream-Status: Backport
14
15Signed-off-by: Michael Forney <mforney@mforney.org>
16Signed-off-by: Steve Dickson <steved@redhat.com>
17Signed-off-by: Maxin B. John <maxin.john@intel.com>
18---
19 src/svc.c | 7 ++++---
20 1 file changed, 4 insertions(+), 3 deletions(-)
21
22diff --git a/src/svc.c b/src/svc.c
23index 9c41445..b59467b 100644
24--- a/src/svc.c
25+++ b/src/svc.c
26@@ -99,7 +99,7 @@ xprt_register (xprt)
27 {
28 __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
29 if (__svc_xports == NULL)
30- return;
31+ goto unlock;
32 }
33 if (sock < _rpc_dtablesize())
34 {
35@@ -120,14 +120,14 @@ xprt_register (xprt)
36 svc_pollfd[i].fd = sock;
37 svc_pollfd[i].events = (POLLIN | POLLPRI |
38 POLLRDNORM | POLLRDBAND);
39- return;
40+ goto unlock;
41 }
42
43 new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
44 sizeof (struct pollfd)
45 * (svc_max_pollfd + 1));
46 if (new_svc_pollfd == NULL) /* Out of memory */
47- return;
48+ goto unlock;
49 svc_pollfd = new_svc_pollfd;
50 ++svc_max_pollfd;
51
52@@ -135,6 +135,7 @@ xprt_register (xprt)
53 svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
54 POLLRDNORM | POLLRDBAND);
55 }
56+unlock:
57 rwlock_unlock (&svc_fd_lock);
58 }
59
60--
612.5.3
62