drm/amdgpu: make sure BOs are locked in amdgpu_vm_get_memory
authorChristian König <christian.koenig@amd.com>
Mon, 5 Jun 2023 09:11:21 +0000 (11:11 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2023 15:06:59 +0000 (11:06 -0400)
commite2ad8e2df432498b1cee2af04df605723f4d75e6
tree0f012980352bfa6cfd5d99339d7b5830a3f041cb
parent43aedbf4da1db9a9c2f9e160a4ae96dfda83774c
drm/amdgpu: make sure BOs are locked in amdgpu_vm_get_memory

We need to grab the lock of the BO or otherwise can run into a crash
when we try to inspect the current location.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Guchun Chen <guchun.chen@amd.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c