lkml.org 
[lkml]   [2009]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCHv2 08/12]posix_acl: Add the check items
move the ACL validation check in to fs/posix_acl.c.
Including nullpointer check and PTR_ERR check.

---
Signed-off-by: Liuwenyi <qingshenlwy@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: James Morris <jmorris@namei.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Joel Becker <joel.becker@oracle.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

---
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 7cdc319..1eb4726 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -403,13 +403,10 @@ static int jffs2_acl_setxattr(struct dentry
*dentry, const char *name,

if (value) {
acl = posix_acl_from_xattr(value, size);
- if (IS_ERR(acl))
- return PTR_ERR(acl);
- if (acl) {
- rc = posix_acl_valid(acl);
- if (rc)
- goto out;
- }
+ rc = posix_acl_valid(acl);
+ if (rc)
+ goto out;
+
} else {
acl = NULL;
}

--
Best Regards,
Liuwenyi


\
 
 \ /
  Last update: 2009-12-21 12:59    [W:0.025 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site