diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-04-18 18:58:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-11 16:59:18 +0100 |
commit | c564d57c5b9a8fca9afc8fd2632185b20231a75a (patch) | |
tree | d31e1692f8b9575529f9842878a4d984c75f969b /meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch | |
parent | 53073a1dce6c65163e244bee64e5489cbb44fcc1 (diff) | |
download | poky-c564d57c5b9a8fca9afc8fd2632185b20231a75a.tar.gz |
libtirpc: Backport fixes from 1.0.2rc3
These fixes are needed for it to work with gcc7
(From OE-Core rev: 7302d099f65215fe161f16593ad6f87e1944a8f7)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.patch | 62 |
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 @@ | |||
1 | Subject: [PATCH] Add missing rwlock_unlocks in xprt_register | ||
2 | |||
3 | It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run | ||
4 | switched to poll, an early return was added, but the rwlock was not | ||
5 | unlocked. | ||
6 | |||
7 | I observed that rpcbind built against libtirpc-1.0.1 would handle only | ||
8 | one request before hanging, and tracked it down to a missing | ||
9 | rwlock_unlock here. | ||
10 | |||
11 | Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()') | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Signed-off-by: Michael Forney <mforney@mforney.org> | ||
16 | Signed-off-by: Steve Dickson <steved@redhat.com> | ||
17 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
18 | --- | ||
19 | src/svc.c | 7 ++++--- | ||
20 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/src/svc.c b/src/svc.c | ||
23 | index 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 | -- | ||
61 | 2.5.3 | ||
62 | |||