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
|
@ -63,13 +63,12 @@ static struct kfd_process *create_process(const struct task_struct *thread);
|
|||
void kfd_process_create_wq(void)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (kfd_process_wq) {
|
||||
flush_workqueue(kfd_process_wq);
|
||||
destroy_workqueue(kfd_process_wq);
|
||||
kfd_process_wq = NULL;
|
||||
}
|
||||
|
@ -330,6 +329,7 @@ static struct kfd_process *create_process(const struct task_struct *thread)
|
|||
synchronize_rcu();
|
||||
mmu_notifier_unregister_no_release(&process->mmu_notifier, process->mm);
|
||||
err_mmu_notifier:
|
||||
mutex_destroy(&process->mutex);
|
||||
kfd_pasid_free(process->pasid);
|
||||
err_alloc_pasid:
|
||||
kfree(process->queues);
|
||||
|
|
Loading…
Reference in New Issue