Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: c03ea34cbf88 ("drm/amdgpu: add support of debugfs for mqd information")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christophe JAILLET and committed by
Alex Deucher
28c5c486 41ab92d3

+4 -2
+4 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
··· 521 521 } 522 522 523 523 queue_name = kasprintf(GFP_KERNEL, "queue-%d", qid); 524 - if (!queue_name) 525 - return -ENOMEM; 524 + if (!queue_name) { 525 + r = -ENOMEM; 526 + goto unlock; 527 + } 526 528 527 529 #if defined(CONFIG_DEBUG_FS) 528 530 /* Queue dentry per client to hold MQD information */