[PATCH 35/44] drm/amdkfd: Call mutex_destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Destroy SVM-related mutexes correctly.

Change-Id: I85da30b1b0dce72433e6d3b507cb0b55b83b433c
Signed-off-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 3eea8f87724d..0fbc037b06e3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -209,6 +209,8 @@ static void svm_range_free(struct svm_range *prange)
 	svm_range_vram_node_free(prange);
 	svm_range_free_dma_mappings(prange);
 	kvfree(prange->pages_addr);
+	mutex_destroy(&prange->lock);
+	mutex_destroy(&prange->migrate_mutex);
 	kfree(prange);
 }
 
@@ -2220,6 +2222,8 @@ void svm_range_list_fini(struct kfd_process *p)
 	list_for_each_entry_safe(prange, next, &p->svms.list, list)
 		svm_range_free(prange);
 
+	mutex_destroy(&p->svms.lock);
+
 	pr_debug("pasid 0x%x svms 0x%p done\n", p->pasid, &p->svms);
 }
 
-- 
2.31.0

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux