[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200915003406.GC471@uller>
Date: Tue, 15 Sep 2020 00:34:06 +0000
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Zhenzhong Duan <zhenzhong.duan@...il.com>
Cc: linux-kernel@...r.kernel.org, robdclark@...il.com, sean@...rly.run,
airlied@...ux.ie, daniel@...ll.ch, smasetty@...eaurora.org,
jcrouse@...eaurora.org, jonathan@...ek.ca,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org
Subject: Re: [PATCH] drm/msm/a6xx: fix a potential overflow issue
On Sat 12 Sep 10:25 UTC 2020, Zhenzhong Duan wrote:
> It's allocating an array of a6xx_gpu_state_obj structure rathor than
> its pointers.
>
> This patch fix it.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...il.com>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> index b12f5b4..e9ede19 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;
>
> --
> 1.8.3.1
>
Powered by blists - more mailing lists