[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Tao Zhou <tao.zhou1@xxxxxxx> > -----Original Message----- > From: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx> > Sent: Wednesday, November 6, 2024 2:59 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Zhou1, Tao > <Tao.Zhou1@xxxxxxx>; Chai, Thomas <YiPeng.Chai@xxxxxxx> > 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@xxxxxxx> > --- > 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