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>
Wed, 13 Dec 2023 17:39:24 +0000 (18:39 +0100)
commit613eaee4459dfdae02f48cd02231cc177e9c37e7
treefb5a372cd72d17dc2737656a659a2b0a57329474
parent1705927a1073c14518c3dcd032ce8a612b6bce6f
drm/amdgpu: fix memory overflow in the IB test

[ Upstream commit 6b0b7789a7a5f3e69185449f891beea58e563f9b ]

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: Sasha Levin <sashal@kernel.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