Skip to contentSkip to conversation

posix_acl: Add the check items

PATCH In review Liuwenyi 1 participant 1 message Dec 21, 2009 GFS2 file system

lore
Share & tools
lore

Liuwenyi

author
#0 lore raw

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.

---

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
index 87ee309..462f4e3 100644
@@ -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