diff options
author | Zhenzhong Duan <zhenzhong.duan@gmail.com> | 2020-09-12 18:25:58 +0800 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-12 10:44:57 -0700 |
commit | 08d3ab4b46339bc6f97e83b54a3fb4f8bf8f4cd9 (patch) | |
tree | b944c081860047821a461ba180f1538055f387a0 | |
parent | 0a48db562c6264da2ae8013491efd6e8dc780520 (diff) |
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: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c index b12f5b4a1bea..e9ede19193b0 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -875,7 +875,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; |