tree 1bb30ecd2df1beb27b267cbc4e78cab95dce9087
parent a25e426f5cb144ecc77ceca63bfe88345b019bd2
author [EMAIL PROTECTED] <[EMAIL PROTECTED]> Tue Apr 12 08:24:35 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:24:35 2005
[PATCH] Fix acl Oops
)
From: Andreas Gruenbacher <[EMAIL PROTECTED]>
ext[23]_get_acl will return an error when reading the attribute fails or
out-of-memory occurs. Catch this case.
Signed-off-by: Andreas Gruenbacher <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
ext2/acl.c | 2 ++
ext3/acl.c | 2 ++
2 files changed, 4 insertions(+)
Index: fs/ext2/acl.c
===================================================================
--- dbace1a5a55b21c848824ce9b0b7ad8150afd099/fs/ext2/acl.c (mode:100644
sha1:f94c7424f931f7b8d7c9b8f94dc332ff3ad73a5d)
+++ 1bb30ecd2df1beb27b267cbc4e78cab95dce9087/fs/ext2/acl.c (mode:100644
sha1:4539ec488eba4e576191e3ce58817efebbdd2717)
@@ -283,6 +283,8 @@
{
struct posix_acl *acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
if (acl) {
int error = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
Index: fs/ext3/acl.c
===================================================================
--- dbace1a5a55b21c848824ce9b0b7ad8150afd099/fs/ext3/acl.c (mode:100644
sha1:bbb18b302553d152d591196e0f993d14afec39bd)
+++ 1bb30ecd2df1beb27b267cbc4e78cab95dce9087/fs/ext3/acl.c (mode:100644
sha1:378b8bc4979dbb556e685969b9c1c72796478c5d)
@@ -286,6 +286,8 @@
{
struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
if (acl) {
int error = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html