From: Dan Carpenter <dan.carpenter@linaro.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Aleksandr Mishin <amishin@t-argos.ru>, Keerthy <j-keerthy@ti.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
"Andrew F. Davis" <afd@ti.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] gpio: davinci: Fix potential buffer overflow
Date: Thu, 28 Mar 2024 19:45:03 +0300 [thread overview]
Message-ID: <cbfb9094-2574-4e00-b401-1ddd81a2850b@moroto.mountain> (raw)
In-Reply-To: <b2c6bc3e-11c5-4a20-8a30-666821ab2613@intel.com>
On Thu, Mar 28, 2024 at 04:27:24PM +0100, Alexander Lobakin wrote:
> > diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> > index bb499e362912..b65df1f2b83f 100644
> > --- a/drivers/gpio/gpio-davinci.c
> > +++ b/drivers/gpio/gpio-davinci.c
> > @@ -257,6 +257,9 @@ static int davinci_gpio_probe(struct platform_device *pdev)
> > spin_lock_init(&chips->lock);
> >
> > nbank = DIV_ROUND_UP(ngpio, 32);
> > + if (nbank > MAX_REGS_BANKS || nbank > 5) {
> > + nbank = MAX_REGS_BANKS < 5 ? MAX_REGS_BANKS : 5;
> > + }
>
> Static analysis warnings make no sense until you provide a reliable way
> to trigger the problem on real systems.
This patch isn't correct, but we merge a few static checker fixes every
day.
regards,
dan carpenter
prev parent reply other threads:[~2024-03-28 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 9:10 Aleksandr Mishin
2024-03-28 10:32 ` Dan Carpenter
2024-03-28 15:27 ` Alexander Lobakin
2024-03-28 16:23 ` Aleksandr Mishin
2024-03-28 16:32 ` Alexander Lobakin
2024-03-28 16:45 ` 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=cbfb9094-2574-4e00-b401-1ddd81a2850b@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=afd@ti.com \
--cc=aleksander.lobakin@intel.com \
--cc=amishin@t-argos.ru \
--cc=brgl@bgdev.pl \
--cc=j-keerthy@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
/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
all inboxes | Powered by JetHome®