Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-11-27 07:41:04 +1100
committerMichal Hocko <mhocko@suse.com>2018-11-30 14:40:08 +0100
commit4b3111154fd638f5835eeb28f2e30ba7addc046e (patch)
tree761e39ad4e6aef617ec39e3988b1e86377332732
parent0eac55ab8d43f9989891b30bdf86f2aa5b10219f (diff)
Fix breakage in nfs-idmap-hang.fix (bsc#1105799, bsc#1117042).
-rw-r--r--patches.fixes/nfs-idmap-hang.fix227
-rw-r--r--series.conf1
2 files changed, 28 insertions, 0 deletions
diff --git a/patches.fixes/nfs-idmap-hang.fix2 b/patches.fixes/nfs-idmap-hang.fix2
new file mode 100644
index 0000000000..1ab878e994
--- /dev/null
+++ b/patches.fixes/nfs-idmap-hang.fix2
@@ -0,0 +1,27 @@
+From: NeilBrown <neilb@suse.com>
+Subject: Fix breakage in nfs-idmap-hang.fix
+Patch-mainline: never, upstream code has changed substantially.
+References: bsc#1105799, bsc#1117042
+
+The name string is not nul terminated, so strnlen() might
+return a larger number.
+We only want to check for embedded nuls, so only check up to 'namelen'.
+
+Acked-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Neil Brown <neilb@suse.com>
+
+---
+ fs/nfs/idmap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/nfs/idmap.c
++++ b/fs/nfs/idmap.c
+@@ -526,7 +526,7 @@ nfs_idmap_id(struct idmap *idmap, struct
+ }
+ if (namelen >= IDMAP_NAMESZ)
+ return -EINVAL;
+- if (strnlen(name, IDMAP_NAMESZ) != namelen)
++ if (strnlen(name, namelen) != namelen)
+ /* Embedded nuls cause problems */
+ return -EINVAL;
+
diff --git a/series.conf b/series.conf
index c28e3e9164..e569631360 100644
--- a/series.conf
+++ b/series.conf
@@ -3489,6 +3489,7 @@
patches.fixes/0007-nfs-limit-access-cache-size.patch
patches.fixes/nfsv4-1-honour-rqst-size.patch
patches.fixes/nfs-idmap-hang.fix
+ patches.fixes/nfs-idmap-hang.fix2
########################################################
# lockd