posix_acl: Add the check items
PATCH v2 7/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 <[email protected]>
Cc Steven Whitehouse <[email protected]>
Cc Al Viro <[email protected]>
Cc Joel Becker <[email protected]>
Cc James Morris <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
fs/gfs2/acl.c +0 -0
@@ -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)
Signature · 2 lines
Best Regards, Liuwenyi