kernel_samsung_a53x/drivers/gpu/drm/amd
Alex Hung 2231b71bd1 drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[]
[ Upstream commit b38a4815f79b87efb196cd5121579fc51e29a7fb ]

[WHY & HOW]
num_valid_sets needs to be checked to avoid a negative index when
accessing reader_wm_sets[num_valid_sets - 1].

This fixes an OVERRUN issue 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:57 +01:00
..
acp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amdgpu drm/amdgpu: avoid reading vf2pf info size from FB 2024-11-23 23:20:56 +01:00
amdkfd drm/amdkfd: don't allow mapping the MMIO HDP page with large pages 2024-11-23 23:20:53 +01:00
display drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[] 2024-11-23 23:20:57 +01:00
include drm/amdgpu/atomfirmware: silence UBSAN warning 2024-11-19 14:19:42 +01:00
pm drm/amd/pm: fix uninitialized variable warnings for vega10_hwmgr 2024-11-23 23:20:56 +01:00