Commit 08d3ab4b authored by Zhenzhong Duan's avatar Zhenzhong Duan Committed by Rob Clark

drm/msm/a6xx: fix a potential overflow issue

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

This patch fix it.
Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 0a48db56
...@@ -875,7 +875,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu, ...@@ -875,7 +875,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,
int i; int i;
a6xx_state->indexed_regs = state_kcalloc(a6xx_state, count, a6xx_state->indexed_regs = state_kcalloc(a6xx_state, count,
sizeof(a6xx_state->indexed_regs)); sizeof(*a6xx_state->indexed_regs));
if (!a6xx_state->indexed_regs) if (!a6xx_state->indexed_regs)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment