lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] thunderbolt:debugfs:Fix memory leak with using debugfs_lookup()
On Wed, Nov 22, 2023 at 04:02:43PM +0800, Yaxiong Tian wrote:
> From: Yaxiong Tian <tianyaxiong@kylinos.cn>
>
> As Greg said,When calling debugfs_lookup() the result must have dput()
> called on it,otherwise the memory will leak over time.
> So just call debugfs_lookup_and_remove() instead.
>
> Fixes: d0f1e0c2a699 ("thunderbolt: Add support for receiver lane margining")
> Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>

Slightly modified the commit log and applied to thunderbolt.git/fixes, thanks!

\
 
 \ /
  Last update: 2023-11-27 11:59    [W:0.041 / U:1.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site