]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2
authorLuben Tuikov <luben.tuikov@amd.com>
Wed, 20 Jul 2022 19:04:18 +0000 (15:04 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Jul 2022 20:23:34 +0000 (16:23 -0400)
commit364c5e348beead36deb8305275204865070bc948
tree1364ee72b102fa1b337e35a70be0788638bc6eca
parent5709aa23eff31c6a8380e9b6b8dcaf0a5c2afbc2
drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2

Protect the struct amdgpu_bo_list with a mutex. This is used during command
submission in order to avoid buffer object corruption as recorded in
the link below.

v2 (chk): Keep the mutex looked for the whole CS to avoid using the
  list from multiple CS threads at the same time.

Suggested-by: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Cc: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2048
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c