diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-04-14 15:43:19 -0700 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-05-17 22:25:26 -0400 |
commit | c0ce2224531ad6c19a62db19c0ec7575af1cfb10 (patch) | |
tree | bef17ecef019b65ff8b2a9cda619c85304b79663 | |
parent | dd76ad6b17f4ef69e0522b625070c4efbcf8183c (diff) | |
download | linux-stable-c0ce2224531ad6c19a62db19c0ec7575af1cfb10.tar.gz linux-stable-c0ce2224531ad6c19a62db19c0ec7575af1cfb10.tar.bz2 linux-stable-c0ce2224531ad6c19a62db19c0ec7575af1cfb10.zip |
ocfs2: dereferencing freed pointers in ocfs2_reflink()
[ Upstream commit e073fc58dfe6a4c9b614320c1d56bb71cb213ec4 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | fs/ocfs2/refcounttree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index d81f6e2a97f5..e794c38bf900 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4278,7 +4278,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, |