projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2241ab5
)
ovl: fix tmpfile leak
author
Miklos Szeredi
<mszeredi@redhat.com>
Tue, 24 Jan 2023 15:41:18 +0000
(16:41 +0100)
committer
Miklos Szeredi
<mszeredi@redhat.com>
Fri, 27 Jan 2023 15:16:12 +0000
(16:16 +0100)
Missed an error cleanup.
Reported-by: syzbot+fd749a7ea127a84e0ffd@syzkaller.appspotmail.com
Fixes:
2b1a77461f16
("ovl: use vfs_tmpfile_open() helper")
Cc: <stable@vger.kernel.org> # v6.1
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/copy_up.c
patch
|
blob
|
history
diff --git
a/fs/overlayfs/copy_up.c
b/fs/overlayfs/copy_up.c
index
6e4e65e
..
140f274
100644
(file)
--- a/
fs/overlayfs/copy_up.c
+++ b/
fs/overlayfs/copy_up.c
@@
-792,7
+792,7
@@
static int ovl_copy_up_tmpfile(struct ovl_copy_up_ctx *c)
if (!c->metacopy && c->stat.size) {
err = ovl_copy_up_file(ofs, c->dentry, tmpfile, c->stat.size);
if (err)
-
return err
;
+
goto out_fput
;
}
err = ovl_copy_up_metadata(c, temp);