drm/amdgpu/userq: fix error handling of invalid doorbell
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/userq: fix error handling of invalid doorbell
If the doorbell is invalid, be sure to set the r to an error state so the function returns an error.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1 -0
@@ -426,6 +426,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)if (index == (uint64_t )-EINVAL ) {drm_file_err (uq_mgr->file,"Failed to get doorbell for queue\n" );kfree (queue); + r = -EINVAL ; goto unlock; }
Signature · 1 line
2.50.1
Ping?
Quoted 24 lines · Alex Deucher
If the doorbell is invalid, be sure to set the r to an error state so the function returns an error.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1
-1@@ -426,6 +426,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)if (index == (uint64_t )-EINVAL ) {drm_file_err (uq_mgr->file,"Failed to get doorbell for queue\n" );kfree (queue); + r = -EINVAL ; goto unlock; } --2.50.1
David Wu
Reviewed-by David (Ming Qiang) WuAgreed with the change. Thanks!
Quoted 26 lines · Alex Deucher
Ping?
Quoted 23 lines · Alex Deucher
If the doorbell is invalid, be sure to set the r to an error state so the function returns an error.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1
-1@@ -426,6 +426,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)if (index == (uint64_t )-EINVAL ) {drm_file_err (uq_mgr->file,"Failed to get doorbell for queue\n" );kfree (queue); + r = -EINVAL ; goto unlock; } --2.50.1
[AMD Official Use Only - AMD Internal Distribution Only]
This patch is Reviewed-by: "[email protected]"
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, August 27, 2025 12:29 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
Ping?
Quoted 25 lines · Alex Deucher
If the doorbell is invalid, be sure to set the r to an error state so the function returns an error.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1
-1@@ -426,6 +426,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)if (index == (uint64_t )-EINVAL ) {drm_file_err (uq_mgr->file,"Failed to get doorbell for queue\n" );kfree (queue); + r = -EINVAL ; goto unlock; } --2.50.1