From: Wolfram Sang <wsa@the-dreams.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
Alain Volmat <alain.volmat@st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] i2c: stm32f7: prevent array underflow in stm32f7_get_lower_rate()
Date: Thu, 30 Apr 2020 14:07:12 +0000 [thread overview]
Message-ID: <20200430140712.GA3355@ninjato> (raw)
In-Reply-To: <20200429132323.GB815283@mwanda>
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
On Wed, Apr 29, 2020 at 04:23:23PM +0300, Dan Carpenter wrote:
> We want to break with "i" set to zero whether we find the rate we want
> or not. In the current code, if we don't find the rate we want then it
> exits the loop with "i" set to -1 and results in an array underflow.
>
> Fixes: 09cc9a3bce91 ("i2c: stm32f7: allows for any bus frequency")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
Alain Volmat <alain.volmat@st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] i2c: stm32f7: prevent array underflow in stm32f7_get_lower_rate()
Date: Thu, 30 Apr 2020 16:07:12 +0200 [thread overview]
Message-ID: <20200430140712.GA3355@ninjato> (raw)
In-Reply-To: <20200429132323.GB815283@mwanda>
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
On Wed, Apr 29, 2020 at 04:23:23PM +0300, Dan Carpenter wrote:
> We want to break with "i" set to zero whether we find the rate we want
> or not. In the current code, if we don't find the rate we want then it
> exits the loop with "i" set to -1 and results in an array underflow.
>
> Fixes: 09cc9a3bce91 ("i2c: stm32f7: allows for any bus frequency")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-04-30 14:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 13:23 [PATCH] i2c: stm32f7: prevent array underflow in stm32f7_get_lower_rate() Dan Carpenter
2020-04-29 13:23 ` Dan Carpenter
2020-04-29 14:15 ` Alain Volmat
2020-04-29 14:15 ` Alain Volmat
2020-04-29 14:15 ` Alain Volmat
2020-04-30 14:07 ` Wolfram Sang [this message]
2020-04-30 14:07 ` Wolfram Sang
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=20200430140712.GA3355@ninjato \
--to=wsa@the-dreams.de \
--cc=alain.volmat@st.com \
--cc=alexandre.torgue@st.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pierre-yves.mordret@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.