Messages in this thread | | | Date | Sat, 3 Sep 2022 07:36:38 +0200 | From | Greg KH <> | Subject | Re: [PATCH v2] mm/damon/dbgfs: fix memory leak when using |
| |
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
| |