drm/amdgpu: lock both VM and BO in amdgpu_gem_object_open
authorChristian König <christian.koenig@amd.com>
Tue, 20 Jan 2026 11:57:21 +0000 (12:57 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Feb 2026 20:24:59 +0000 (15:24 -0500)
commitfd1fa48b935f22c7d99713bf33846e14a6bb6ab9
tree53ccc641973c7509ed45751b41533e5a2945d969
parentabde491143e4e12eecc41337910aace4e8d59603
drm/amdgpu: lock both VM and BO in amdgpu_gem_object_open

The VM was not locked in the past since we initially only cleared the
linked list element and not added it to any VM state.

But this has changed quite some time ago, we just never realized this
problem because the VM state lock was masking it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c