]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdkfd: destroy mutex if process creation fails
authorOded Gabbay <oded.gabbay@gmail.com>
Thu, 23 Jun 2016 14:54:29 +0000 (17:54 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 3 Jul 2016 05:05:45 +0000 (08:05 +0300)
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_process.c

index 2485f31d37dbdebf664b701d17c31638566ff85c..4f3849ac8c0770d1dbde09f9d6e371fb24c01e94 100644 (file)
@@ -329,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);