lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220902130105.139138-1-gregkh@linuxfoundation.org>
Date:   Fri,  2 Sep 2022 15:01:05 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng^Ci@....com>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Alex Deuc her <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        Xinhui.Pan@....com
Cc:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Leo Li <sunpeng.li@....com>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Wayne Lin <Wayne.Lin@....com>,
        hersen wu <hersenxs.wu@....com>,
        Wenjing Liu <wenjing.liu@....com>,
        Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
        Thelford Williams <tdwilliamsiv@...il.com>,
        Fangzhi Zuo <Jerry.Zuo@....com>,
        Yongzhi Liu <lyz_cs@....edu.cn>,
        Mikita Lipski <mikita.lipski@....com>,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        Bhanuprakash Modem <bhanuprakash.modem@...el.com>,
        Sean Paul <seanpaul@...omium.org>,
        amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Subject: [PATCH] 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 <harry.wentland@....com>
Cc: Leo Li <sunpeng.li@....com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@....com>
Cc: Alex Deucher <alexander.deucher@....com>
Cc: "Christian König" <christian.koenig@....com>
Cc: "Pan, Xinhui" <Xinhui.Pan@....com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: Wayne Lin <Wayne.Lin@....com>
Cc: hersen wu <hersenxs.wu@....com>
Cc: Wenjing Liu <wenjing.liu@....com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Cc: Thelford Williams <tdwilliamsiv@...il.com>
Cc: Fangzhi Zuo <Jerry.Zuo@....com>
Cc: Yongzhi Liu <lyz_cs@....edu.cn>
Cc: Mikita Lipski <mikita.lipski@....com>
Cc: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@...el.com>
Cc: Sean Paul <seanpaul@...omium.org>
Cc: amd-gfx@...ts.freedesktop.org
Cc: dri-devel@...ts.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index 0e48824f55e3..ee242d9d8b06 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -3288,6 +3288,7 @@ void crtc_debugfs_init(struct drm_crtc *crtc)
 				   &crc_win_y_end_fops);
 	debugfs_create_file_unsafe("crc_win_update", 0644, dir, crtc,
 				   &crc_win_update_fops);
+	dput(dir);
 #endif
 	debugfs_create_file("amdgpu_current_bpc", 0644, crtc->debugfs_entry,
 			    crtc, &amdgpu_current_bpc_fops);
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ