]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: detect_link_and_local_sink: DP alt mode timeout path leaks prev_sink...
authorWenTao Liang <vulab@iscas.ac.cn>
Fri, 26 Jun 2026 12:45:55 +0000 (20:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 17:02:23 +0000 (13:02 -0400)
commita6e14b976be48eebd8769cb5b883a6af7fc5ade1
treefc38e0631a42ca587ec8f63b644bef4346d52549
parent220f22e1d66c1cfb63387eb1c4210f92a357c2d9
drm/amd/display: detect_link_and_local_sink: DP alt mode timeout path leaks prev_sink reference

prev_sink is unconditionally retained via dc_sink_retain at function
  entry, but the DP alt mode timeout path inside SIGNAL_TYPE_DISPLAY_PORT
  returns false without releasing prev_sink. All other return paths in the
  function correctly call dc_sink_release(prev_sink), making this the only
  missing cleanup.

Fixes: 54618888d1ea ("drm/amd/display: break down dc_link.c")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20260626124555.36910-1-vulab@iscas.ac.cn
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 45510cf662dcf46b5d8926d454f338809f107b9d)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/dc/link/link_detection.c