From: Dan Carpenter <dan.carpenter@oracle.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>,
Mark Greer <mgreer@animalcreek.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nathan Chancellor <natechancellor@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Arnd Bergmann <arnd@arndb.de>, Coiby Xu <coiby.xu@gmail.com>,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH] staging: greybus: fix stack size warning with UBSAN
Date: Mon, 4 Jan 2021 09:22:04 +0300 [thread overview]
Message-ID: <20210104062203.GP2831@kadam> (raw)
In-Reply-To: <20210103223541.2790855-1-arnd@kernel.org>
On Sun, Jan 03, 2021 at 11:35:32PM +0100, Arnd Bergmann wrote:
> @@ -1050,78 +1088,28 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
> strlcpy(temp_name, w->name, NAME_SIZE);
> snprintf(w->name, NAME_SIZE, "GB %d %s", module->dev_id, temp_name);
>
> + if (w->type > ARRAY_SIZE(gbaudio_widgets)) {
^^
Off by one. >= here.
> + ret = -EINVAL;
> + goto error;
> + }
> + *dw = gbaudio_widgets[w->type];
> + dw->name = w->name;
regards,
dan carpenter
prev parent reply other threads:[~2021-01-04 6:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-03 22:35 [PATCH] staging: greybus: fix stack size warning with UBSAN Arnd Bergmann
2021-01-04 2:18 ` Alex Elder
2021-01-04 6:22 ` Dan Carpenter [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=20210104062203.GP2831@kadam \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=coiby.xu@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=vaibhav.sr@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