From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Kees Cook <keescook@chromium.org>,
Rob Clark <robdclark@gmail.com>,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>, David Airlie <airlied@linux.ie>,
Jordan Crouse <jcrouse@codeaurora.org>
Subject: Re: [PATCH] drm/msm/adreno: Remove VLA usage
Date: Mon, 2 Jul 2018 10:34:08 +0200 [thread overview]
Message-ID: <b531d35a-631f-c84c-831d-9ce6cff02436@users.sourceforge.net> (raw)
In-Reply-To: <20180629184818.GA37439@beast>
> @@ -91,12 +93,13 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname)
> ret = qcom_mdt_load(dev, fw, fwname, GPU_PAS_ID,
> mem_region, mem_phys, mem_size, NULL);
> } else {
> - char newname[strlen("qcom/") + strlen(fwname) + 1];
> + char *newname;
>
> - sprintf(newname, "qcom/%s", fwname);
> + newname = kasprintf(GFP_KERNEL, "qcom/%s", fwname);
>
> ret = qcom_mdt_load(dev, fw, newname, GPU_PAS_ID,
> mem_region, mem_phys, mem_size, NULL);
I have taken another look also at this update suggestion.
Now I wonder why the return value is not checked for the added name construction
in the way as it is specified for the function “adreno_request_fw”.
Will another condition check make sense at this place?
Regards,
Markus
prev parent reply other threads:[~2018-07-02 8:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 18:48 [PATCH] drm/msm/adreno: Remove VLA usage Kees Cook
2018-06-29 20:47 ` Arnd Bergmann
2018-06-29 21:19 ` Jordan Crouse
2018-06-29 21:20 ` Jordan Crouse
2018-08-02 23:24 ` Kees Cook
2018-08-03 12:04 ` Rob Clark
2018-07-02 8:34 ` SF Markus Elfring [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=b531d35a-631f-c84c-831d-9ce6cff02436@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jcrouse@codeaurora.org \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@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