Messages in this thread | | | Date | Fri, 3 Feb 2023 09:47:34 -0800 | From | Roman Gushchin <> | Subject | Re: [PATCH] mm/slub: fix memory leak with using debugfs_lookup() |
| |
On Thu, Feb 02, 2023 at 03:20:22PM +0100, 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: Christoph Lameter <cl@linux.com> > Cc: Pekka Enberg <penberg@kernel.org> > Cc: David Rientjes <rientjes@google.com> > Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Vlastimil Babka <vbabka@suse.cz> > Cc: Roman Gushchin <roman.gushchin@linux.dev> > Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Good catch!
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Thanks!
| |