diff options
author | Alex Hung <alex.hung@amd.com> | 2024-04-16 16:22:35 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-08 07:53:05 +0200 |
commit | b36e9b3104c4ba0f2f5dd083dcf6159cb316c996 (patch) | |
tree | 2e6c93712f69c706a932a2eb39e7ea72ce4854e1 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | f338f99f6a04d03c802087d82a83561cbd5bdc99 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions