drm/amdgpu: Fix out-of-bound access for gfx_v10_0_ring_test_ib()
authorHaohui Mai <ricetons@gmail.com>
Mon, 25 Apr 2022 08:56:05 +0000 (16:56 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Apr 2022 15:44:09 +0000 (11:44 -0400)
commit428f273cbb3f1349d27716bce0d7bd4dbfb4837f
treeba017013f67ce2a8b471e2306b707649eb4d23ef
parentca5d251b3b6e3aabf2d1bb7261c6b8e156b7ee16
drm/amdgpu: Fix out-of-bound access for gfx_v10_0_ring_test_ib()

The gfx_v10_0_ring_test_ib() function uses 20 bytes instead of 16
bytes during the test. The patch sets the size of the allocation to be
4-byte larger to match the actual usage.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Haohui Mai <ricetons@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c