[PATCH 3.16 087/114] ocfs2: dereferencing freed pointers in ocfs2_reflink()
From: Ben Hutchings <hidden>
Date: 2016-06-13 18:56:48
Also in:
lkml
From: Ben Hutchings <hidden>
Date: 2016-06-13 18:56:48
Also in:
lkml
3.16.36-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter <redacted> commit e073fc58dfe6a4c9b614320c1d56bb71cb213ec4 upstream. 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 <redacted> Reviewed-by: Mark Fasheh <redacted> 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: Ben Hutchings <redacted> --- fs/ocfs2/refcounttree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c@@ -4278,7 +4278,7 @@ static int ocfs2_reflink(struct dentry * 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,