diff options
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch | 55 | ||||
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb | 1 |
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 @@ | |||
| 1 | From 78bb645a42c216b37b8d930c7c849a3fa89babf8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Takashi Iwai <tiwai@suse.com> | ||
| 3 | Date: Sat, 16 Jan 2016 12:02:30 -0500 | ||
| 4 | Subject: [PATCH] Fix protocol minor version fall-back | ||
| 5 | |||
| 6 | mount.nfs currently expects mount(2) to fail with EPROTONOSUPPORT if | ||
| 7 | the kernel doesn't understand the requested NFS version. | ||
| 8 | |||
| 9 | Unfortunately if the requested minor is not known to the kernel | ||
| 10 | it returns -EINVAL. | ||
| 11 | In kernels since 3.11 this can happen in nfs4_alloc_client(), if | ||
| 12 | compiled without NFS_V4_2. | ||
| 13 | |||
| 14 | More generally it can happen in in nfs_validate_text_mount_data() | ||
| 15 | when nfs_parse_mount_options() returns 0 because | ||
| 16 | nfs_parse_version_string() | ||
| 17 | didn't recognise the version. | ||
| 18 | |||
| 19 | EPROTONOSUPPORT is only returned if NFSv4 support is completely compiled | ||
| 20 | out. | ||
| 21 | |||
| 22 | So nfs_autonegotiate needs to check for EINVAL as well as | ||
| 23 | EPROTONOSUPPORT. | ||
| 24 | |||
| 25 | URL: https://bugzilla.opensuse.org/show_bug.cgi?id=959211 | ||
| 26 | Reported-by: Takashi Iwai <tiwai@suse.com> | ||
| 27 | Signed-off-by: NeilBrown <neilb@suse.com> | ||
| 28 | Signed-off-by: Steve Dickson <steved@redhat.com> | ||
| 29 | |||
| 30 | |||
| 31 | Upstream-Status: Backport | ||
| 32 | http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=patch;h=78bb645a42c216b37b8d930c7c849a3fa89babf8 | ||
| 33 | |||
| 34 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 35 | --- | ||
| 36 | utils/mount/stropts.c | 3 +++ | ||
| 37 | 1 file changed, 3 insertions(+) | ||
| 38 | |||
| 39 | diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c | ||
| 40 | index 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 | -- | ||
| 54 | 2.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 | ||
| 38 | SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b" | 39 | SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b" |
