]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Fix array-index-out-of-bounds in dcn35_clkmgr
authorRoman Li <roman.li@amd.com>
Tue, 30 Jan 2024 23:07:24 +0000 (18:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:46 +0000 (09:51 +0100)
commitca400d8e0c1c9d79c08dfb6b7f966e26c8cae7fb
tree8d9afae4f5eda4b9617299e683f5a887a02a616f
parentddb9e7211484a9c9654a65e01086df28c5f5cd7e
drm/amd/display: Fix array-index-out-of-bounds in dcn35_clkmgr

commit 46806e59a87790760870d216f54951a5b4d545bc upstream.

[Why]
There is a potential memory access violation while
iterating through array of dcn35 clks.

[How]
Limit iteration per array size.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c