]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: Limit clock assignments by size of clk tables
authorAlex Hung <alex.hung@amd.com>
Fri, 26 Apr 2024 17:25:50 +0000 (11:25 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:18 +0000 (16:18 -0400)
commit1cbb91cb29a71f0a22f6909bf9c0ad43bd315bae
treefed44681acc4609f8872570d8d23152f2a891f79
parent674704a5dabe4a434645fdd11e35437f4e06dfc4
drm/amd/display: Limit clock assignments by size of clk tables

[WHAT & HOW]
Check clk table's array size to avoid out-of-bound memory accesses.

This fixes two OVERRUN issues reported by Coverity.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c