tree c4d697372f6c2f2e2f2548f75c1dbb5b821ab805
parent 81ddef77bb774e771db8588b937665cd38f40cee
author [EMAIL PROTECTED] <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:24:00 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:24:00 -0700
[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
===================================================================
--- 5e89b0f6bb47a43b3b00d30a5e1e22db727b5047/fs/ext2/acl.c (mode:100644
sha1:8369ee8d28c4f2249ab20d0cd36645d7d18148de)
+++ c4d697372f6c2f2e2f2548f75c1dbb5b821ab805/fs/ext2/acl.c (mode:100644
sha1:25f4a64fd6bc005f2204973300461dfa185bc020)
@@ -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
===================================================================
--- 5e89b0f6bb47a43b3b00d30a5e1e22db727b5047/fs/ext3/acl.c (mode:100644
sha1:328592c3a956f9e03317af985694b24fc608b8ff)
+++ c4d697372f6c2f2e2f2548f75c1dbb5b821ab805/fs/ext3/acl.c (mode:100644
sha1:638c13a26c0375dc5536fe44e51963c1cf217040)
@@ -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