Commit 28c5c486 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Alex Deucher
Browse files

drm/amdgpu: Fix missing unlocking in an error path in amdgpu_userq_create()



If kasprintf() fails, some mutex still need to be released to avoid locking
issue, as already done in all other error handling path.

Fixes: c03ea34c ("drm/amdgpu: add support of debugfs for mqd information")
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/


Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 41ab92d3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -521,8 +521,10 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
	}

	queue_name = kasprintf(GFP_KERNEL, "queue-%d", qid);
	if (!queue_name)
		return -ENOMEM;
	if (!queue_name) {
		r = -ENOMEM;
		goto unlock;
	}

#if defined(CONFIG_DEBUG_FS)
	/* Queue dentry per client to hold MQD information   */