From: Liuwenyi <qingshenlwy@gmail.com>
To: chris.mason@oracle.com, viro@zeniv.linux.org.uk,
joel.becker@oracle.com, cjb@laptop.org, jmorris@namei.org,
serue@us.ibm.com, hch@lst.de, akpm@linux-foundation.org,
adilger@sun.com, jack@suse.cz, tytso@mit.edu,
dwmw2@infradead.org, swhiteho@redhat.com, bfields@fieldses.org,
neilb@suse.de, ffilzlnx@us.ibm.com, bharrosh@panasas.com,
mfasheh@suse.com, tiger.yang@oracle.com, jeffm@suse.com,
aelder@sgi.com, sandeen@sandeen.net, xfs-masters@oss.sgi.com,
xfs@oss.sgi.com, reiserfs-devel@vger.kernel.org,
ocfs2-devel@oss.oracle.com, linux-nfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
cluster-devel@redhat.com, linux-mtd@lists.infradead.org,
strongzgy@gmail.com, onlyflyer@gmail.com
Subject: [PATCHv2 01/12]posix_acl: Add the check items
Date: Mon, 21 Dec 2009 19:52:17 +0800 [thread overview]
Message-ID: <4B2F6171.4090108@gmail.com> (raw)
Add the acl validation check-items
to fix the null pointer error and PTR_ERR error.
Thanks for Matthew Wilcox's sguuestion.
---
Signed-off-by: Liuwenyi <qingshenlwy@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Joel Becker <joel.becker@oracle.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: James Morris <jmorris@namei.org>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Jan Kara <jack@suse.cz>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Frank Filz <ffilzlnx@us.ibm.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Tiger Yang <tiger.yang@oracle.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Alex Elder <aelder@sgi.com>
Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-masters@oss.sgi.com
Cc: xfs@oss.sgi.com
Cc: reiserfs-devel@vger.kernel.org
Cc: ocfs2-devel@oss.oracle.com
Cc: linux-nfs@vger.kernel.org
Cc: linux-ext4@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: cluster-devel@redhat.com
Cc: linux-mtd@lists.infradead.org
--
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 39df95a..d4bacb9 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -76,6 +76,12 @@ posix_acl_valid(const struct posix_acl *acl)
unsigned int id = 0; /* keep gcc happy */
int needs_mask = 0;
+ if (!acl)
+ return -EINVAL;
+
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
+
FOREACH_ACL_ENTRY(pa, acl, pe) {
if (pa->e_perm & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
return -EINVAL;
--
Best Regards,
Liuwenyi
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
reply other threads:[~2009-12-21 11:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B2F6171.4090108@gmail.com \
--to=qingshenlwy@gmail.com \
--cc=adilger@sun.com \
--cc=aelder@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=bharrosh@panasas.com \
--cc=chris.mason@oracle.com \
--cc=cjb@laptop.org \
--cc=cluster-devel@redhat.com \
--cc=dwmw2@infradead.org \
--cc=ffilzlnx@us.ibm.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jeffm@suse.com \
--cc=jmorris@namei.org \
--cc=joel.becker@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=neilb@suse.de \
--cc=ocfs2-devel@oss.oracle.com \
--cc=onlyflyer@gmail.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=sandeen@sandeen.net \
--cc=serue@us.ibm.com \
--cc=strongzgy@gmail.com \
--cc=swhiteho@redhat.com \
--cc=tiger.yang@oracle.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=xfs-masters@oss.sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox