linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] mm/damon/dbgfs: fix memory leak when using
Date: Sat, 3 Sep 2022 07:36:38 +0200	[thread overview]
Message-ID: <YxLn5kSmX+xE5QLe@kroah.com> (raw)
In-Reply-To: <20220902191149.112434-1-sj@kernel.org>

On Fri, Sep 02, 2022 at 07:11:49PM +0000, SeongJae Park wrote:
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> debugfs_lookup()
> Date: Fri,  2 Sep 2022 14:56:31 +0200	[thread overview]
> Message-ID: <20220902125631.128329-1-gregkh@linuxfoundation.org> (raw)
> 
> When calling debugfs_lookup() the result must have dput() called on it,
> otherwise the memory will leak over time.  Fix this up by properly
> calling dput().
> 
> Fixes: 75c1c2b53c78b ("mm/damon/dbgfs: support multiple contexts")
> Cc: <stable@vger.kernel.org> # 5.15.x
> Cc: SeongJae Park <sj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: damon@lists.linux.dev
> Cc: linux-mm@kvack.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> Changes from v1
> (https://lore.kernel.org/damon/20220902125631.128329-1-gregkh@linuxfoundation.org/)
> - Call dput() for failure-return case (Andrew Morton)

Thanks for fixing this up, I missed the other return error cases in my
rush to audit the whole tree at once.

This version looks great, and I see Andrew has taken it now into his
tree, thanks!

greg k-h


      reply	other threads:[~2022-09-03  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 19:11 SeongJae Park
2022-09-03  5:36 ` Greg KH [this message]

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=YxLn5kSmX+xE5QLe@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    --cc=stable@vger.kernel.org \
    /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