From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Cc: linux-kernel@vger.kernel.org, robdclark@gmail.com,
sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch,
smasetty@codeaurora.org, jcrouse@codeaurora.org,
jonathan@marek.ca, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm/a6xx: fix a potential overflow issue
Date: Tue, 15 Sep 2020 00:34:06 +0000 [thread overview]
Message-ID: <20200915003406.GC471@uller> (raw)
In-Reply-To: <20200912102558.656-1-zhenzhong.duan@gmail.com>
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@linaro.org>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.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
>
prev parent reply other threads:[~2020-09-15 0:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 10:25 [PATCH] drm/msm/a6xx: fix a potential overflow issue Zhenzhong Duan
2020-09-14 16:20 ` Jordan Crouse
2020-09-16 2:28 ` Zhenzhong Duan
2020-09-15 0:34 ` Bjorn Andersson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200915003406.GC471@uller \
--to=bjorn.andersson@linaro.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jcrouse@codeaurora.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
--cc=zhenzhong.duan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox