[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Alex Sierra <[email protected]>

> -----Original Message-----
> From: Yang, Philip <[email protected]>
> Sent: Tuesday, December 9, 2025 2:37 PM
> To: [email protected]
> Cc: Sierra Guiza, Alejandro (Alex) <[email protected]>; Kuehling, Felix
> <[email protected]>; Yang, Philip <[email protected]>
> Subject: [PATCH] drm/amdkfd: Unreserve bo if queue update failed
>
> Error handling path should unreserve bo then return failed.
>
> Fixes: 305cd109b761 ("drm/amdkfd: Validate user queue update")
> Signed-off-by: Philip Yang <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> index 232103742712..6babdf025359 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> @@ -592,6 +592,7 @@ int pqm_update_queue_properties(struct
> process_queue_manager *pqm,
>                                        p->queue_size)) {
>                       pr_debug("ring buf 0x%llx size 0x%llx not mapped on
> GPU\n",
>                                p->queue_address, p->queue_size);
> +                     amdgpu_bo_unreserve(vm->root.bo);
>                       return -EFAULT;
>               }
>
> --
> 2.50.1

Reply via email to