Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccd0e788 authored by Dave Airlie's avatar Dave Airlie
Browse files

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()
parents 5dd0775e 7fd5e03c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);