]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Avoid a NULL pointer dereference
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 24 Jul 2025 20:00:43 +0000 (15:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:43 +0000 (16:28 +0200)
commit36a6b43573d152736eaf2557fe60580dd73e9350
tree8c76ec8b37439d49195d77c9670a237aad4e3d64
parent86c2825791c3836a8f77a954b9c5ebe6fab410c5
drm/amd/display: Avoid a NULL pointer dereference

commit 07b93a5704b0b72002f0c4bd1076214af67dc661 upstream.

[WHY]
Although unlikely drm_atomic_get_new_connector_state() or
drm_atomic_get_old_connector_state() can return NULL.

[HOW]
Check returns before dereference.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1e5e8d672fec9f2ab352be121be971877bff2af9)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c