[SRU][J][PATCH 1/1] drm/amd/display: Check dce_hwseq before dereferencing it

Cengiz Can cengiz.can at canonical.com
Fri Sep 11 00:15:00 UTC 2026


From: Alex Hung <alex.hung at amd.com>

[WHAT]

hws was checked for null earlier in dce110_blank_stream, indicating hws
can be null, and should be checked whenever it is used.

Cc: Mario Limonciello <mario.limonciello at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
Signed-off-by: Alex Hung <alex.hung at amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
(backported from commit 79db43611ff61280b6de58ce1305e0b2ecf675ad)
[bot_kybele: Fix landed in dce110_hw_sequencer.c (upstream file is
 hwss/dce110/dce110_hwseq.c); this tree lacks
 link->skip_implict_edp_power_control, so the edp_backlight_control call was
 unconditional. Added only the `if (hws)` null guard, preserving the fix's
 intent.]
Cc: stable at vger.kernel.org
CVE-2025-38361
Assisted-by: kybele:claude-opus-4.8
Signed-off-by: Cengiz Can <cengiz.can at canonical.com>
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 42a38ae463fe..11ff334a11c0 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1227,7 +1227,8 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
 	struct dce_hwseq *hws = link->dc->hwseq;
 
 	if (link->local_sink && link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
-		hws->funcs.edp_backlight_control(link, false);
+		if (hws)
+			hws->funcs.edp_backlight_control(link, false);
 		link->dc->hwss.set_abm_immediate_disable(pipe_ctx);
 	}
 
-- 
2.53.0




More information about the kernel-team mailing list