Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2014-08-05 00:15:41 -0400
committerJeff Mahoney <jeffm@suse.com>2014-08-05 00:15:41 -0400
commit258e3b07437ae78fddd69b23e6101c90daf338f5 (patch)
tree7386bf79e25f744c297eeec54d92d097fe9493d7
parent1bbc06d9e332a4b0e4758e4a68c65f959275534c (diff)
nfs: nfs3_list_one_acl(): check get_acl() result with
IS_ERR_OR_NULL (bko#81111 bnc#889790).
-rw-r--r--patches.fixes/nfs-nfs3_list_one_acl-check-get_acl-result-with-is_err_or_null32
-rw-r--r--series.conf1
2 files changed, 33 insertions, 0 deletions
diff --git a/patches.fixes/nfs-nfs3_list_one_acl-check-get_acl-result-with-is_err_or_null b/patches.fixes/nfs-nfs3_list_one_acl-check-get_acl-result-with-is_err_or_null
new file mode 100644
index 0000000000..c0d7fa5b0b
--- /dev/null
+++ b/patches.fixes/nfs-nfs3_list_one_acl-check-get_acl-result-with-is_err_or_null
@@ -0,0 +1,32 @@
+From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
+Subject: nfs: nfs3_list_one_acl(): check get_acl() result with IS_ERR_OR_NULL
+Patch-mainline: Submitted to LKML 24 Jul 2014, reviewed by Trond and HCH
+References: bko#81111 bnc#889790
+
+There was a check for result being not NULL. But get_acl() may return
+NULL, or ERR_PTR, or actual pointer.
+The purpose of the function where current change is done is to "list
+ACLs only when they are available", so any error condition of get_acl()
+mustn't be elevated, and returning 0 there is still valid.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81111
+Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
+Acked-by: Jeff Mahoney <jeffm@suse.com>
+---
+ fs/nfs/nfs3acl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
+index 8f854dd..d0fec26 100644
+--- a/fs/nfs/nfs3acl.c
++++ b/fs/nfs/nfs3acl.c
+@@ -256,7 +256,7 @@ nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
+ char *p = data + *result;
+
+ acl = get_acl(inode, type);
+- if (!acl)
++ if (IS_ERR_OR_NULL(acl))
+ return 0;
+
+ posix_acl_release(acl);
+
diff --git a/series.conf b/series.conf
index 8de86b41fc..1b9c974ae5 100644
--- a/series.conf
+++ b/series.conf
@@ -236,6 +236,7 @@
########################################################
# NFS
########################################################
+ patches.fixes/nfs-nfs3_list_one_acl-check-get_acl-result-with-is_err_or_null
########################################################