diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-02 15:10:09 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-02-08 18:49:59 -0500 |
commit | ad0e4e2fab928477f74d742e6e77d79245d3d3e7 (patch) | |
tree | 2b1d0eca7f6773f50484ab1cdb4c9097ee4ee2bd /include/ufs/ufshcd.h | |
parent | 339aa12218728cad1caf6de3ff7a83771aeed164 (diff) | |
download | linux-ad0e4e2fab928477f74d742e6e77d79245d3d3e7.tar.gz linux-ad0e4e2fab928477f74d742e6e77d79245d3d3e7.tar.bz2 linux-ad0e4e2fab928477f74d742e6e77d79245d3d3e7.zip |
scsi: snic: 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.
Link: https://lore.kernel.org/r/20230202141009.2290380-1-gregkh@linuxfoundation.org
Cc: Karan Tilak Kumar <kartilak@cisco.com>
Cc: Sesidhar Baddela <sebaddel@cisco.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs/ufshcd.h')
0 files changed, 0 insertions, 0 deletions