Skip to content

Commit

Permalink
ocfs2: dereferencing freed pointers in ocfs2_reflink()
Browse files Browse the repository at this point in the history
The code at the "out" label assumes that "default_acl" and "acl" are NULL,
but actually the pointers can be NULL, unitialized, or freed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Apr 14, 2015
1 parent d0ba25b commit e073fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/refcounttree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4276,7 +4276,7 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
error = posix_acl_create(dir, &mode, &default_acl, &acl);
if (error) {
mlog_errno(error);
goto out;
return error;
}

error = ocfs2_create_inode_in_orphan(dir, mode,
Expand Down

0 comments on commit e073fc5

Please sign in to comment.