drm/amdgpu: fix memory overflow in the IB test
authorTim Huang <Tim.Huang@amd.com>
Tue, 21 Nov 2023 03:06:51 +0000 (11:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:52:17 +0000 (08:52 +0100)
commit6dfccebfecc4b99f64d25351bb6ac69f1a6926e2
tree1cc7d7f1a7839660ce49faa45c7407b567c7e682
parent5ffd8c73d1d0f38706951c4ab8710cb6c6cdde45
drm/amdgpu: fix memory overflow in the IB test

commit 6b0b7789a7a5f3e69185449f891beea58e563f9b upstream.

Fix a memory overflow issue in the gfx IB test
for some ASICs. At least 20 bytes are needed for
the IB test packet.

v2: correct code indentation errors. (Christian)

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c