1
0
Fork 0

drm/msm/a6xx: fix a potential overflow issue

[ Upstream commit 08d3ab4b46 ]

It's allocating an array of a6xx_gpu_state_obj structure rathor than
its pointers.

This patch fix it.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Zhenzhong Duan 2020-09-12 18:25:58 +08:00 committed by Greg Kroah-Hartman
parent bab673eef8
commit 6458e8e868
1 changed files with 1 additions and 1 deletions

View File

@ -834,7 +834,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,
int i;
a6xx_state->indexed_regs = state_kcalloc(a6xx_state, count,
sizeof(a6xx_state->indexed_regs));
sizeof(*a6xx_state->indexed_regs));
if (!a6xx_state->indexed_regs)
return;