[PATCH next] drm/amdgpu/userq: Call unreserve on error in amdgpu_userq_fence_read_wptr()
Alex Deucher
alexdeucher at gmail.com
Wed Apr 30 14:16:59 UTC 2025
Applied. Thanks!
On Wed, Apr 30, 2025 at 4:08 AM Dan Carpenter <dan.carpenter at linaro.org> wrote:
>
> This error path should call amdgpu_bo_unreserve() before returning.
>
> Fixes: d8675102ba32 ("drm/amdgpu: add vm root BO lock before accessing the vm")
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> index be068e8e37d1..57169a8224be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> @@ -373,6 +373,7 @@ static int amdgpu_userq_fence_read_wptr(struct amdgpu_usermode_queue *queue,
>
> mapping = amdgpu_vm_bo_lookup_mapping(queue->vm, addr >> PAGE_SHIFT);
> if (!mapping) {
> + amdgpu_bo_unreserve(queue->vm->root.bo);
> DRM_ERROR("Failed to lookup amdgpu_bo_va_mapping\n");
> return -EINVAL;
> }
> --
> 2.47.2
>
More information about the amd-gfx
mailing list