Merge tag 'drm-amdkfd-next-2016-07-03' of git://people.freedesktop.org/~gabbayo/linux into drm-next
A few amdkfd patches for 4.8. One patch replaces deprecated kernel api call (create_workqueue) and the other patch properly cleans up resources in case of failing to create a process object. * tag 'drm-amdkfd-next-2016-07-03' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: destroy mutex if process creation fails drm/amdkfd: Remove create_workqueue()
This commit is contained in:
commit
ccd0e7887b
1 changed files with 2 additions and 2 deletions
|
@ -63,13 +63,12 @@ static struct kfd_process *create_process(const struct task_struct *thread);
|
||||||
void kfd_process_create_wq(void)
|
void kfd_process_create_wq(void)
|
||||||
{
|
{
|
||||||
if (!kfd_process_wq)
|
if (!kfd_process_wq)
|
||||||
kfd_process_wq = create_workqueue("kfd_process_wq");
|
kfd_process_wq = alloc_workqueue("kfd_process_wq", 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kfd_process_destroy_wq(void)
|
void kfd_process_destroy_wq(void)
|
||||||
{
|
{
|
||||||
if (kfd_process_wq) {
|
if (kfd_process_wq) {
|
||||||
flush_workqueue(kfd_process_wq);
|
|
||||||
destroy_workqueue(kfd_process_wq);
|
destroy_workqueue(kfd_process_wq);
|
||||||
kfd_process_wq = NULL;
|
kfd_process_wq = NULL;
|
||||||
}
|
}
|
||||||
|
@ -330,6 +329,7 @@ err_process_pqm_init:
|
||||||
synchronize_rcu();
|
synchronize_rcu();
|
||||||
mmu_notifier_unregister_no_release(&process->mmu_notifier, process->mm);
|
mmu_notifier_unregister_no_release(&process->mmu_notifier, process->mm);
|
||||||
err_mmu_notifier:
|
err_mmu_notifier:
|
||||||
|
mutex_destroy(&process->mutex);
|
||||||
kfd_pasid_free(process->pasid);
|
kfd_pasid_free(process->pasid);
|
||||||
err_alloc_pasid:
|
err_alloc_pasid:
|
||||||
kfree(process->queues);
|
kfree(process->queues);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue