* [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
@ 2025-08-22 16:15 Alex Deucher
2025-08-26 16:29 ` Alex Deucher
0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2025-08-22 16:15 UTC (permalink / raw)
To: amd-gfx; +Cc: 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 <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 424831997cb1a..28242ec2215da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
2025-08-22 16:15 [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell Alex Deucher
@ 2025-08-26 16:29 ` Alex Deucher
2025-08-26 17:18 ` David Wu
2025-08-27 6:14 ` Zhang, Jesse(Jie)
0 siblings, 2 replies; 4+ messages in thread
From: Alex Deucher @ 2025-08-26 16:29 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx
Ping?
On Fri, Aug 22, 2025 at 12:33 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> 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 <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index 424831997cb1a..28242ec2215da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
2025-08-26 16:29 ` Alex Deucher
@ 2025-08-26 17:18 ` David Wu
2025-08-27 6:14 ` Zhang, Jesse(Jie)
1 sibling, 0 replies; 4+ messages in thread
From: David Wu @ 2025-08-26 17:18 UTC (permalink / raw)
To: Alex Deucher, Alex Deucher; +Cc: amd-gfx
Agreed with the change. Thanks!
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
On 2025-08-26 12:29, Alex Deucher wrote:
> Ping?
>
> On Fri, Aug 22, 2025 at 12:33 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>> 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 <alexander.deucher@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
>> index 424831997cb1a..28242ec2215da 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
>> @@ -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
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
2025-08-26 16:29 ` Alex Deucher
2025-08-26 17:18 ` David Wu
@ 2025-08-27 6:14 ` Zhang, Jesse(Jie)
1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Jesse(Jie) @ 2025-08-27 6:14 UTC (permalink / raw)
To: Alex Deucher, Deucher, Alexander; +Cc: amd-gfx@lists.freedesktop.org
[AMD Official Use Only - AMD Internal Distribution Only]
This patch is Reviewed-by: "Jesse.zhang@amd.com"
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Wednesday, August 27, 2025 12:29 AM
To: Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
Ping?
On Fri, Aug 22, 2025 at 12:33 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> 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 <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index 424831997cb1a..28242ec2215da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-27 6:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 16:15 [PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell Alex Deucher
2025-08-26 16:29 ` Alex Deucher
2025-08-26 17:18 ` David Wu
2025-08-27 6:14 ` Zhang, Jesse(Jie)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).