summaryrefslogtreecommitdiffstats
path: root/lib/errname.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-02 16:14:11 +0100
committerPetr Mladek <pmladek@suse.com>2023-02-03 10:42:02 +0100
commit55bf243c514553e907efcf2bda92ba090eca8c64 (patch)
tree6c826587056778dff3fab40c7b2629e5b8a78da7 /lib/errname.c
parentf2e4cca2f670c8e52fbb551a295f2afc9aa2bd72 (diff)
downloadlinux-55bf243c514553e907efcf2bda92ba090eca8c64.tar.gz
linux-55bf243c514553e907efcf2bda92ba090eca8c64.tar.bz2
linux-55bf243c514553e907efcf2bda92ba090eca8c64.zip
kernel/printk/index.c: fix memory leak with using debugfs_lookup()
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> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20230202151411.2308576-1-gregkh@linuxfoundation.org
Diffstat (limited to 'lib/errname.c')
0 files changed, 0 insertions, 0 deletions