From: Oded Gabbay Date: Thu, 23 Jun 2016 14:54:29 +0000 (+0300) Subject: drm/amdkfd: destroy mutex if process creation fails X-Git-Tag: v4.8-rc1~62^2~26^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7fd5e03ca6b41a591bd9fda083362b8a07cfb5f7;p=linux.git drm/amdkfd: destroy mutex if process creation fails Signed-off-by: Oded Gabbay --- diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 2485f31d37db..4f3849ac8c07 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -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);