summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-11-23 14:41:03 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:07 +0000
commit93947f60e94aba68057d3cc00511f1322cc801b5 (patch)
tree988a818b59743f95e4a35c8f0044155fe222a92f /meta/recipes-connectivity/nfs-utils
parent8be26d5833cea0d221d85a3502bbc11641209701 (diff)
downloadpoky-93947f60e94aba68057d3cc00511f1322cc801b5.tar.gz
nfs-utils: 1.3.3 -> 1.3.4
(From OE-Core rev: 844c63050e849c68fc9b40ada2068309e5e37e16) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils')
-rw-r--r--meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch23
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch113
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch55
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.4.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb)6
4 files changed, 14 insertions, 183 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch b/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch
index 85002290f0..ede0dcefc4 100644
--- a/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch
+++ b/meta/recipes-connectivity/nfs-utils/files/nfs-utils-debianize-start-statd.patch
@@ -9,17 +9,18 @@ Signed-off-by: Li Wang <li.wang@windriver.com>
9Signed-off-by: Roy Li <rongqing.li@windriver.com> 9Signed-off-by: Roy Li <rongqing.li@windriver.com>
10Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 10Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
11--- 11---
12 utils/statd/start-statd | 9 ++++++++- 12 utils/statd/start-statd | 10 +++++++++-
13 1 file changed, 8 insertions(+), 1 deletion(-) 13 1 file changed, 9 insertions(+), 1 deletion(-)
14 14
15diff --git a/utils/statd/start-statd b/utils/statd/start-statd 15diff --git a/utils/statd/start-statd b/utils/statd/start-statd
16index ec9383b..3969b8c 100755 16index 2fd6039..f591b34 100755
17--- a/utils/statd/start-statd 17--- a/utils/statd/start-statd
18+++ b/utils/statd/start-statd 18+++ b/utils/statd/start-statd
19@@ -6,6 +6,13 @@ 19@@ -17,6 +17,14 @@ then
20 # site. 20 # statd already running - must have been slow to respond.
21 PATH="/sbin:/usr/sbin:/bin:/usr/bin" 21 exit 0
22 22 fi
23+
23+# Read config 24+# Read config
24+DEFAULTFILE=/etc/default/nfs-common 25+DEFAULTFILE=/etc/default/nfs-common
25+NEED_IDMAPD= 26+NEED_IDMAPD=
@@ -28,14 +29,14 @@ index ec9383b..3969b8c 100755
28+fi 29+fi
29+ 30+
30 # First try systemd if it's installed. 31 # First try systemd if it's installed.
31 if systemctl --help >/dev/null 2>&1; then 32 if [ -d /run/systemd/system ]; then
32 # Quit only if the call worked. 33 # Quit only if the call worked.
33@@ -13,4 +20,4 @@ if systemctl --help >/dev/null 2>&1; then 34@@ -25,4 +33,4 @@ fi
34 fi
35 35
36 cd /
36 # Fall back to launching it ourselves. 37 # Fall back to launching it ourselves.
37-exec rpc.statd --no-notify 38-exec rpc.statd --no-notify
38+exec rpc.statd --no-notify $STATDOPTS 39+exec rpc.statd --no-notify $STATDOPTS
39-- 40--
401.9.1 412.6.6
41 42
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
deleted file mode 100644
index de0b045c8c..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
+++ /dev/null
@@ -1,113 +0,0 @@
1Upstream-Status: Pending
2
3Subject: nfs-utils/statd: fix a segfault caused by improper usage of RPC interface
4
5There is a hack which uses the bottom-level RPC improperly as below
6in the current statd implementation:
7insert a socket in the svc_fdset without a corresponding transport handle
8and passes the socket to the svc_getreqset subroutine, this usage causes
9a segfault of statd on a huge amount of sm-notifications.
10
11Fix the issue by separating the non-RPC-server sock from RPC dispatcher.
12
13Signed-off-by: Shan Hai <shan.hai@windriver.com>
14Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
15---
16 utils/statd/rmtcall.c | 1 -
17 utils/statd/statd.c | 5 +++--
18 utils/statd/statd.h | 2 +-
19 utils/statd/svc_run.c | 8 ++++++--
20 4 files changed, 10 insertions(+), 6 deletions(-)
21
22diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
23index fd576d9..cde091b 100644
24--- a/utils/statd/rmtcall.c
25+++ b/utils/statd/rmtcall.c
26@@ -104,7 +104,6 @@ statd_get_socket(void)
27 if (sockfd < 0)
28 return -1;
29
30- FD_SET(sockfd, &SVC_FDSET);
31 return sockfd;
32 }
33
34diff --git a/utils/statd/statd.c b/utils/statd/statd.c
35index 51a016e..e21a259 100644
36--- a/utils/statd/statd.c
37+++ b/utils/statd/statd.c
38@@ -247,6 +247,7 @@ int main (int argc, char **argv)
39 int port = 0, out_port = 0;
40 int nlm_udp = 0, nlm_tcp = 0;
41 struct rlimit rlim;
42+ int notify_sockfd;
43
44 int pipefds[2] = { -1, -1};
45 char status;
46@@ -473,7 +474,7 @@ int main (int argc, char **argv)
47 }
48
49 /* Make sure we have a privilege port for calling into the kernel */
50- if (statd_get_socket() < 0)
51+ if ((notify_sockfd = statd_get_socket()) < 0)
52 exit(1);
53
54 /* If sm-notify didn't take all the state files, load
55@@ -528,7 +529,7 @@ int main (int argc, char **argv)
56 * Handle incoming requests: SM_NOTIFY socket requests, as
57 * well as callbacks from lockd.
58 */
59- my_svc_run(); /* I rolled my own, Olaf made it better... */
60+ my_svc_run(notify_sockfd); /* I rolled my own, Olaf made it better... */
61
62 /* Only get here when simulating a crash so we should probably
63 * start sm-notify running again. As we have already dropped
64diff --git a/utils/statd/statd.h b/utils/statd/statd.h
65index a1d8035..231ac7e 100644
66--- a/utils/statd/statd.h
67+++ b/utils/statd/statd.h
68@@ -28,7 +28,7 @@ extern _Bool statd_present_address(const struct sockaddr *sap, char *buf,
69 __attribute__((__malloc__))
70 extern char * statd_canonical_name(const char *hostname);
71
72-extern void my_svc_run(void);
73+extern void my_svc_run(int);
74 extern void notify_hosts(void);
75 extern void shuffle_dirs(void);
76 extern int statd_get_socket(void);
77diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c
78index d98ecee..28c1ad6 100644
79--- a/utils/statd/svc_run.c
80+++ b/utils/statd/svc_run.c
81@@ -78,7 +78,7 @@ my_svc_exit(void)
82 * The heart of the server. A crib from libc for the most part...
83 */
84 void
85-my_svc_run(void)
86+my_svc_run(int sockfd)
87 {
88 FD_SET_TYPE readfds;
89 int selret;
90@@ -96,6 +96,8 @@ my_svc_run(void)
91 }
92
93 readfds = SVC_FDSET;
94+ /* Set notify sockfd for waiting for reply */
95+ FD_SET(sockfd, &readfds);
96 if (notify) {
97 struct timeval tv;
98
99@@ -125,8 +127,10 @@ my_svc_run(void)
100
101 default:
102 selret -= process_reply(&readfds);
103- if (selret)
104+ if (selret) {
105+ FD_CLR(sockfd, &readfds);
106 svc_getreqset(&readfds);
107+ }
108 }
109 }
110 }
111--
1121.9.1
113
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
deleted file mode 100644
index 683246c4a4..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 78bb645a42c216b37b8d930c7c849a3fa89babf8 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.com>
3Date: Sat, 16 Jan 2016 12:02:30 -0500
4Subject: [PATCH] Fix protocol minor version fall-back
5
6mount.nfs currently expects mount(2) to fail with EPROTONOSUPPORT if
7the kernel doesn't understand the requested NFS version.
8
9Unfortunately if the requested minor is not known to the kernel
10it returns -EINVAL.
11In kernels since 3.11 this can happen in nfs4_alloc_client(), if
12compiled without NFS_V4_2.
13
14More generally it can happen in in nfs_validate_text_mount_data()
15when nfs_parse_mount_options() returns 0 because
16nfs_parse_version_string()
17didn't recognise the version.
18
19EPROTONOSUPPORT is only returned if NFSv4 support is completely compiled
20out.
21
22So nfs_autonegotiate needs to check for EINVAL as well as
23EPROTONOSUPPORT.
24
25URL: https://bugzilla.opensuse.org/show_bug.cgi?id=959211
26Reported-by: Takashi Iwai <tiwai@suse.com>
27Signed-off-by: NeilBrown <neilb@suse.com>
28Signed-off-by: Steve Dickson <steved@redhat.com>
29
30
31Upstream-Status: Backport
32http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=patch;h=78bb645a42c216b37b8d930c7c849a3fa89babf8
33
34Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
35---
36 utils/mount/stropts.c | 3 +++
37 1 file changed, 3 insertions(+)
38
39diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
40index c8f5a6d..86829a9 100644
41--- a/utils/mount/stropts.c
42+++ b/utils/mount/stropts.c
43@@ -841,6 +841,9 @@ check_result:
44 case EPROTONOSUPPORT:
45 /* A clear indication that the server or our
46 * client does not support NFS version 4 and minor */
47+ case EINVAL:
48+ /* A less clear indication that our client
49+ * does not support NFSv4 minor version. */
50 if (mi->version.v_mode == V_GENERAL &&
51 mi->version.minor == 0)
52 return result;
53--
542.7.4
55
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.4.bb
index 1a0d4d7482..4d6d8080f4 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.4.bb
@@ -31,13 +31,11 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
31 file://proc-fs-nfsd.mount \ 31 file://proc-fs-nfsd.mount \
32 file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \ 32 file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
33 file://nfs-utils-debianize-start-statd.patch \ 33 file://nfs-utils-debianize-start-statd.patch \
34 file://0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch \
35 file://bugfix-adjust-statd-service-name.patch \ 34 file://bugfix-adjust-statd-service-name.patch \
36 file://fix-protocol-minor-version-fall-back.patch \
37" 35"
38 36
39SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b" 37SRC_URI[md5sum] = "54e4119043ec8507a2a0e054cf2889a4"
40SRC_URI[sha256sum] = "700d689c5622c87953c34102e5befafc4d3c811e676852238f0dd79c9c0c084d" 38SRC_URI[sha256sum] = "b42a5bc0a8d80d04650030ceb9a11f08f4acfbcb1ee297f657fb94e339c45975"
41 39
42# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will 40# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
43# pull in the remainder of the dependencies. 41# pull in the remainder of the dependencies.