Skip to content

Commit cbfac7f

Browse files
gregkhalexdeucher
authored andcommitted
drm/amd/display: fix memory leak when using debugfs_lookup()
When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. Fix this up by properly calling dput(). Cc: Harry Wentland <[email protected]> Cc: Leo Li <[email protected]> Cc: Rodrigo Siqueira <[email protected]> Cc: Alex Deucher <[email protected]> Cc: "Christian König" <[email protected]> Cc: "Pan, Xinhui" <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Wayne Lin <[email protected]> Cc: hersen wu <[email protected]> Cc: Wenjing Liu <[email protected]> Cc: Patrik Jakobsson <[email protected]> Cc: Thelford Williams <[email protected]> Cc: Fangzhi Zuo <[email protected]> Cc: Yongzhi Liu <[email protected]> Cc: Mikita Lipski <[email protected]> Cc: Jiapeng Chong <[email protected]> Cc: Bhanuprakash Modem <[email protected]> Cc: Sean Paul <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent bbcbd63 commit cbfac7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,6 +3288,7 @@ void crtc_debugfs_init(struct drm_crtc *crtc)
32883288
&crc_win_y_end_fops);
32893289
debugfs_create_file_unsafe("crc_win_update", 0644, dir, crtc,
32903290
&crc_win_update_fops);
3291+
dput(dir);
32913292
#endif
32923293
debugfs_create_file("amdgpu_current_bpc", 0644, crtc->debugfs_entry,
32933294
crtc, &amdgpu_current_bpc_fops);

0 commit comments

Comments
 (0)