]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Check pipe offset before setting vblank
authorAlex Hung <alex.hung@amd.com>
Tue, 23 Apr 2024 00:07:17 +0000 (18:07 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jul 2024 10:49:05 +0000 (12:49 +0200)
commit96bf81cc1bd058bb8af6e755a548e926e934dfd1
treef22705182206954f9ea61cf40eb31072cdb7fa30
parent9933eca6ada0cd612e19522e7a319bcef464c0eb
drm/amd/display: Check pipe offset before setting vblank

[ Upstream commit 5396a70e8cf462ec5ccf2dc8de103c79de9489e6 ]

pipe_ctx has a size of MAX_PIPES so checking its index before accessing
the array.

This fixes an OVERRUN issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c