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:Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by:
Andrew 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:
Xuewen Yan <xuewen.yan@unisoc.com>
Loading
Please sign in to comment