[PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell

David Wu davidwu2 at amd.com
Tue Aug 26 17:18:48 UTC 2025


Agreed with the change. Thanks!

Reviewed-by: David (Ming Qiang) Wu <David.Wu3 at 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 at 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 at 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
>>


More information about the amd-gfx mailing list