diff options
author | 2022-08-08 17:00:38 -0400 | |
---|---|---|
committer | 2022-08-16 18:03:23 -0400 | |
commit | c02895577b834a6148f6d9d0006a6f196511cc79 (patch) | |
tree | 333b61e66796bbc9165685f9cfad65d4667efeec /drivers/gpu/drm/amd/amdkfd/kfd_svm.h | |
parent | drm/amd/pm: add mode1 support on smu_v13_0_7 (diff) | |
download | linux-c02895577b834a6148f6d9d0006a6f196511cc79.tar.gz linux-c02895577b834a6148f6d9d0006a6f196511cc79.tar.bz2 linux-c02895577b834a6148f6d9d0006a6f196511cc79.zip |
drm/amdkfd: Fix mm reference in SVM eviction worker
Use the mm reference from the fence. This allows removing the
svm_bo->svms pointer, which was problematic because we cannot assume
that the struct kfd_process containing the svms is still allocated
without holding a refcount on the process.
Use mmget_not_zero to ensure the mm is still valid, and drop the svm_bo
reference if it isn't.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_svm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h index 9156b041ef17..cfac13ad06ef 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h @@ -46,7 +46,6 @@ struct svm_range_bo { spinlock_t list_lock; struct amdgpu_amdkfd_fence *eviction_fence; struct work_struct eviction_work; - struct svm_range_list *svms; uint32_t evicting; struct work_struct release_work; }; |