On Tue, Nov 4, 2025 at 11:56 AM David (Ming Qiang) Wu <[email protected]> wrote:
>
> bo could be NULL in the vm->done list and the
> access of it must be avoided.
>
> Signed-off-by: David (Ming Qiang) Wu <[email protected]>

Sunil already fixed this in:
commit b15e3cc46803daf49625ab3289d103c437310ec3
Author: Sunil Khatri <[email protected]>
Date:   Fri Oct 31 14:10:13 2025 +0530

    drm/amdgpu: validate the bo from done list for NULL

    Make sure the bo is valid before using it.

    Signed-off-by: Sunil Khatri <[email protected]>
    Reviewed-by: Christian König <[email protected]>


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index cc2f96ed7004..d0ff226c6dc1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -943,7 +943,7 @@ amdgpu_userq_vm_validate(struct amdgpu_userq_mgr *uq_mgr)
>         list_for_each_entry(bo_va, &vm->done, base.vm_status) {
>                 bo = bo_va->base.bo;
>
> -               if (!amdgpu_ttm_tt_is_userptr(bo->tbo.ttm))
> +               if (!bo || !amdgpu_ttm_tt_is_userptr(bo->tbo.ttm))
>                         continue;
>
>                 range = xa_load(&xa, key);
> --
> 2.43.0
>

Reply via email to