[PATCH] drm/amdgpu: fix ACA bank count boundary check error
Zhou1, Tao
Tao.Zhou1 at amd.com
Wed Nov 6 07:23:51 UTC 2024
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> Sent: Wednesday, November 6, 2024 2:59 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Zhou1, Tao
> <Tao.Zhou1 at amd.com>; Chai, Thomas <YiPeng.Chai at amd.com>
> Subject: [PATCH] drm/amdgpu: fix ACA bank count boundary check error
>
> fix ACA bank count boundary check error.
>
> Fixes: f5e4cc8461c4 ("drm/amdgpu: implement RAS ACA driver framework")
>
> Signed-off-by: Yang Wang <kevinyang.wang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
> index 2ca127173135..9d6345146495 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
> @@ -158,7 +158,7 @@ static int aca_smu_get_valid_aca_banks(struct
> amdgpu_device *adev, enum aca_smu_
> return -EINVAL;
> }
>
> - if (start + count >= max_count)
> + if (start + count > max_count)
> return -EINVAL;
>
> count = min_t(int, count, max_count);
> --
> 2.34.1
More information about the amd-gfx
mailing list