[PATCHv2 07/12]posix_acl: Add the check items

From: Liuwenyi
Date: Mon Dec 21 2009 - 06:55:38 EST


move the ACL validation check in to fs/posix_acl.c.
Including nullpointer check and PTR_ERR check.

---
Signed-off-by: Liuwenyi <qingshenlwy@xxxxxxxxx>
Cc: Steven Whitehouse <swhiteho@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Joel Becker <joel.becker@xxxxxxxxxx>
Cc: James Morris <jmorris@xxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: cluster-devel@xxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 87ee309..462f4e3 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -284,17 +284,6 @@ static int gfs2_xattr_system_set(struct dentry
*dentry, const char *name,
goto set_acl;

acl = posix_acl_from_xattr(value, size);
- if (!acl) {
- /*
- * acl_set_file(3) may request that we set default ACLs with
- * zero length -- defend (gracefully) against that here.
- */
- goto out;
- }
- if (IS_ERR(acl)) {
- error = PTR_ERR(acl);
- goto out;
- }

error = posix_acl_valid(acl);
if (error)

--
Best Regards,
Liuwenyi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/