summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.3.bb1
2 files changed, 56 insertions, 0 deletions
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
new file mode 100644
index 0000000000..683246c4a4
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
@@ -0,0 +1,55 @@
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.3.bb
index 8540503df9..a2bebe0ba8 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
@@ -33,6 +33,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
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 \ 34 file://0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch \
35 file://bugfix-adjust-statd-service-name.patch \ 35 file://bugfix-adjust-statd-service-name.patch \
36 file://fix-protocol-minor-version-fall-back.patch \
36" 37"
37 38
38SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b" 39SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b"