Skip to content

Commit

Permalink
[PATCH] reiserfs: fix potential (unlikely) oops in reiserfs_get_acl
Browse files Browse the repository at this point in the history
This fixes a potential oops if there is an error reported by
posix_acl_from_disk().  This is mostly theoretical due to the use of
magics and checksums in xattrs, but is still possible.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Feb 13, 2006
1 parent 326a625 commit 90947ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/reiserfs/xattr_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
acl = ERR_PTR(retval);
} else {
acl = posix_acl_from_disk(value, retval);
*p_acl = posix_acl_dup(acl);
if (!IS_ERR(acl))
*p_acl = posix_acl_dup(acl);
}

kfree(value);
Expand Down

0 comments on commit 90947ef

Please sign in to comment.