From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH 1/4] ovl: fix memory leak on unlink of indexed file
Date: Tue, 18 Sep 2018 16:34:31 +0300 [thread overview]
Message-ID: <20180918133434.27437-2-amir73il@gmail.com> (raw)
In-Reply-To: <20180918133434.27437-1-amir73il@gmail.com>
Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries")
Cc: <stable@vger.kernel.org> # v4.13
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
fs/overlayfs/util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index 8cfb62cc8672..ace4fe4c39a9 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -683,7 +683,7 @@ static void ovl_cleanup_index(struct dentry *dentry)
struct dentry *upperdentry = ovl_dentry_upper(dentry);
struct dentry *index = NULL;
struct inode *inode;
- struct qstr name;
+ struct qstr name = { };
int err;
err = ovl_get_index_name(lowerdentry, &name);
@@ -726,6 +726,7 @@ static void ovl_cleanup_index(struct dentry *dentry)
goto fail;
out:
+ kfree(name.name);
dput(index);
return;
--
2.17.1
next prev parent reply other threads:[~2018-09-18 13:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 13:34 [PATCH 0/4] Assorted overlayfs fixes for 4.19-rc5 Amir Goldstein
2018-09-18 13:34 ` Amir Goldstein [this message]
2018-09-18 13:59 ` [PATCH 1/4] ovl: fix memory leak on unlink of indexed file Greg KH
2018-09-18 15:14 ` Amir Goldstein
2018-09-18 13:34 ` [PATCH 2/4] ovl: fix freeze protection bypass in ovl_write_iter() Amir Goldstein
2018-09-18 13:34 ` [PATCH 3/4] ovl: fix freeze protection bypass in ovl_clone_file_range() Amir Goldstein
2018-09-18 13:34 ` [PATCH 4/4] vfs: swap names of {do,vfs}_clone_file_range() Amir Goldstein
2018-09-24 8:25 ` [PATCH 0/4] Assorted overlayfs fixes for 4.19-rc5 Amir Goldstein
2018-09-24 8:56 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180918133434.27437-2-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).