[PATCH] drm/amdgpu/userq: fix error handling of invalid doorbell
Zhang, Jesse(Jie)
Jesse.Zhang at amd.com
Wed Aug 27 06:14:51 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
This patch is Reviewed-by: "Jesse.zhang at amd.com"
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Wednesday, August 27, 2025 12:29 AM
To: Deucher, Alexander <Alexander.Deucher at amd.com>
Cc: amd-gfx at 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 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