xfs
[Top] [All Lists]

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

To: aelder@xxxxxxx, xfs-masters@xxxxxxxxxxx, hch@xxxxxx, viro@xxxxxxxxxxxxxxxxxx, sandeen@xxxxxxxxxxx, joel.becker@xxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, strongzgy@xxxxxxxxx, onlyflyer@xxxxxxxxx
Subject: [PATCHv2 12/12]posix_acl: Add the check items
From: Liuwenyi <qingshenlwy@xxxxxxxxx>
Date: Mon, 21 Dec 2009 20:03:19 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=+WJoZ89zVm9nkWOF60exlDMYpHf6PH3EWXqOxni9Qic=; b=XFr3Yq81+qerSRjFNxJqVrlLIvoYEwyMBIwt+xGa34R5TWnXhtj+8GJgxbmpPxHnpZ DYWKHeq+AEGgEALXSY5Fw7D6eE7Kz9OiJAIdZ30S215pXtrucXbT8oaCJZ1NscNL53MQ /sy8zBWH++w5W4xJa1SbGqaYRvllHPwymDt9k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Q+Kbqjj/A/dpIHKwNZ0VRxf16phg1RFPEyh1X78wtImv3yqmSWRzd4E6G15i8j0nIL 6kjo00DBFqesyUn430Hz8Cldg3LxJZg5ZvIyBcjxmbw3xtE6euWChYoMgSd4lW0LDT3Q cHYa88jzqLiDVbLUH2N9jXbhIvAcSdGXjNNsQ=
Reply-to: qingshenlwy@xxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
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: Alex Elder <aelder@xxxxxxx>
Cc: xfs-masters@xxxxxxxxxxx
Cc :Christoph Hellwig <hch@xxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>
Cc: Joel Becker <joel.becker@xxxxxxxxxx>
Cc: xfs@xxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c
index 2512125..3de2533 100644
--- a/fs/xfs/linux-2.6/xfs_acl.c
+++ b/fs/xfs/linux-2.6/xfs_acl.c
@@ -392,17 +392,6 @@ xfs_xattr_acl_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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCHv2 12/12]posix_acl: Add the check items, Liuwenyi <=