diff options
| author | Christophe JAILLET <[email protected]> | 2025-07-09 19:02:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-07-16 19:46:04 +0000 |
| commit | 28c5c486380cc29e82b7747e999b3238f2887539 (patch) | |
| tree | a6a8bea4d7c7cd27550453ea878cf25baa45c108 /drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | |
| parent | drm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory (diff) | |
| download | kernel-28c5c486380cc29e82b7747e999b3238f2887539.tar.gz kernel-28c5c486380cc29e82b7747e999b3238f2887539.zip | |
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 <[email protected]>
Signed-off-by: Christophe JAILLET <[email protected]>
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index b1b80efc7993..941f61f92005 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -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 */ |
