lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/printk/index.c: fix memory leak with using debugfs_lookup()
On Fri, Feb 03, 2023 at 11:16:17AM +0100, Petr Mladek wrote:
> On Thu 2023-02-02 16:14:11, Greg Kroah-Hartman wrote:
> > When calling debugfs_lookup() the result must have dput() called on it,
> > otherwise the memory will leak over time. To make things simpler, just
> > call debugfs_lookup_and_remove() instead which handles all of the logic
> > at once.
> >
> > Cc: Chris Down <chris@chrisdown.name>
> > Cc: Petr Mladek <pmladek@suse.com>
> > Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: John Ogness <john.ogness@linutronix.de>
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> JFYI, the patch has been committed into printk/linux.git, branch for-6.3.

Wonderful, thank you!

greg k-h

\
 
 \ /
  Last update: 2023-03-27 00:15    [W:0.070 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site