]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_p...
authorMa Ke <make24@iscas.ac.cn>
Wed, 26 Feb 2025 08:37:31 +0000 (16:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:52 +0000 (13:01 +0100)
commite0345c3478f185ca840daac7f08a1fcd4ebec3e9
treec38c67a24dac06e010b5b8999ae889c1ec5ef551
parent3e92d62d9534edb31fdb1f5c115ecebf24fb93ea
drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params

commit 374c9faac5a763a05bc3f68ad9f73dab3c6aec90 upstream.

Null pointer dereference issue could occur when pipe_ctx->plane_state
is null. The fix adds a check to ensure 'pipe_ctx->plane_state' is not
null before accessing. This prevents a null pointer dereference.

Found by code review.

Fixes: 3be5262e353b ("drm/amd/display: Rename more dc_surface stuff to plane_state")
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 63e6a77ccf239337baa9b1e7787cde9fa0462092)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c