All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 08/12]posix_acl: Add the check items
@ 2009-12-21 11:59 Liuwenyi
  0 siblings, 0 replies; only message in thread
From: Liuwenyi @ 2009-12-21 11:59 UTC (permalink / raw)
  To: dwmw2, viro, jmorris, akpm, joel.becker, serue, linux-mtd,
	linux-kernel, onlyflyer, strongzgy

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-21 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21 11:59 [PATCHv2 08/12]posix_acl: Add the check items Liuwenyi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.