Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Wang and committed by
Alex Deucher
2bb7dced 6c8d1f4b

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
··· 158 158 return -EINVAL; 159 159 } 160 160 161 - if (start + count >= max_count) 161 + if (start + count > max_count) 162 162 return -EINVAL; 163 163 164 164 count = min_t(int, count, max_count);