stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ovl: fix memory leak on unlink of indexed file
       [not found] <20180918133434.27437-1-amir73il@gmail.com>
@ 2018-09-18 13:34 ` Amir Goldstein
  2018-09-18 13:59   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2018-09-18 13:34 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Al Viro, linux-unionfs, linux-fsdevel, stable

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] ovl: fix memory leak on unlink of indexed file
  2018-09-18 13:34 ` [PATCH 1/4] ovl: fix memory leak on unlink of indexed file Amir Goldstein
@ 2018-09-18 13:59   ` Greg KH
  2018-09-18 15:14     ` Amir Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-09-18 13:59 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Miklos Szeredi, Al Viro, linux-unionfs, linux-fsdevel, stable

On Tue, Sep 18, 2018 at 04:34:31PM +0300, Amir Goldstein wrote:
> 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(-)

I know I reject patches without any changelog text present.  Maybe
Miklos is more forgiving than me... :)

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] ovl: fix memory leak on unlink of indexed file
  2018-09-18 13:59   ` Greg KH
@ 2018-09-18 15:14     ` Amir Goldstein
  0 siblings, 0 replies; 3+ messages in thread
From: Amir Goldstein @ 2018-09-18 15:14 UTC (permalink / raw)
  To: Greg KH; +Cc: Miklos Szeredi, Al Viro, overlayfs, linux-fsdevel, stable

On Tue, Sep 18, 2018 at 4:59 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Sep 18, 2018 at 04:34:31PM +0300, Amir Goldstein wrote:
> > 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(-)
>
> I know I reject patches without any changelog text present.  Maybe
> Miklos is more forgiving than me... :)
>

Well, I did not intend to CC stable at this point, but since I did and since
you chimed in, Miklos, feel free to add to commit message:

The memory leak was detected by kmemleak when running xfstests
overlay/051,053

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-18 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180918133434.27437-1-amir73il@gmail.com>
2018-09-18 13:34 ` [PATCH 1/4] ovl: fix memory leak on unlink of indexed file Amir Goldstein
2018-09-18 13:59   ` Greg KH
2018-09-18 15:14     ` Amir Goldstein

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).