]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: add check to avoid array bound issue
authorGuchun Chen <guchun.chen@amd.com>
Thu, 8 Aug 2019 06:54:41 +0000 (14:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 12 Aug 2019 17:47:48 +0000 (12:47 -0500)
commitbef10197ae5b04eebf5d6b8bf4598efaa6514d4b
treeef7d9ea6dd29511703a83744f7956fd82fcdab6e
parentcee65dc9b77d1e4ed1f0a3b901952a5d9480f9d1
drm/amdgpu: add check to avoid array bound issue

Sub_block_index can be passed from user level, so
add one check before accessing the array first to
prevent array index out of bound problem.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c