diff options
author | Greg Kroah-Hartman <[email protected]> | 2023-02-02 16:14:11 +0100 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2023-02-03 10:42:02 +0100 |
commit | 55bf243c514553e907efcf2bda92ba090eca8c64 (patch) | |
tree | 6c826587056778dff3fab40c7b2629e5b8a78da7 /lib/memory-notifier-error-inject.c | |
parent | f2e4cca2f670c8e52fbb551a295f2afc9aa2bd72 (diff) |
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 <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: John Ogness <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Reviewed-by: John Ogness <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions