aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
diff options
context:
space:
mode:
authorWen Yang <wenyang.linux@foxmail.com>2022-12-25 23:10:58 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-01-05 11:42:36 -0500
commitce17308ffd173ea0c478723d429364e16acec5c8 (patch)
tree045d27e1d3865d86cd4c36f7baf9c92f3e1d9dd0 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
parentf8e12e770e8049917f82387033b3cf44bc43b915 (diff)
downloadlinux-ce17308ffd173ea0c478723d429364e16acec5c8.tar.gz
linux-ce17308ffd173ea0c478723d429364e16acec5c8.tar.bz2
linux-ce17308ffd173ea0c478723d429364e16acec5c8.zip
drm/amd/display: fix array-bounds errors in dc_stream_remove_writeback()
The following errors occurred when using gcc 7.5.0-3ubuntu1~18.04: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:543:55: warning: array subscript is above array bounds [-Warray-bounds]      stream->writeback_info[j] = stream->writeback_info[i];                                  ~~~~~~~~~~~~~~~~~~~~~~^~~ Add a check to make sure that num_wb_info won't overflowing the writeback_info buffer. Fixes: 6fbefb84a98e ("drm/amd/display: Add DC core changes for DCN2") Signed-off-by: Wen Yang <wenyang.linux@foxmail.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Hamza Mahfooz <hamza.mahfooz@amd.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h')
0 files changed, 0 insertions, 0 deletions