Commit ecb0dcb2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Treehugger Robot
Browse files

UPSTREAM: mm/damon/dbgfs: fix memory leak when using debugfs_lookup()

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

Bug:255284914

Link: https://lkml.kernel.org/r/20220902191149.112434-1-sj@kernel.org


Fixes: 75c1c2b5 ("mm/damon/dbgfs: support multiple contexts")
Change-Id: Ie0ea68eefaac7a96f1a897d067d588fa3c82b37c
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 1552fd3e
git: //git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)
Signed-off-by: default avatarXuewen Yan <xuewen.yan@unisoc.com>
parent 52808991
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment