[PATCH 5/6] drm/amdgpu: Fix BUG_ON assert

Christian König ckoenig.leichtzumerken at gmail.com
Wed Jun 23 08:30:26 UTC 2021



Am 22.06.21 um 18:23 schrieb Andrey Grodzovsky:
> With added CPU domain to placement you can have
> now 3 placemnts at once.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

And please add CC: stable at kernel.org since this is trigger able from 
userspace and actually a rather nasty bug.

Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index b7a2070d90af..81268eded073 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -180,7 +180,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
>   		c++;
>   	}
>   
> -	BUG_ON(c >= AMDGPU_BO_MAX_PLACEMENTS);
> +	BUG_ON(c > AMDGPU_BO_MAX_PLACEMENTS);
>   
>   	placement->num_placement = c;
>   	placement->placement = places;



More information about the amd-gfx mailing list