From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Romain Gantois <romain.gantois@bootlin.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] i2c: Fix end of loop test in i2c_atr_find_mapping_by_addr()
Date: Fri, 2 May 2025 16:40:30 +0200 [thread overview]
Message-ID: <aBTZXsMJK3lsiUiU@shikoro> (raw)
In-Reply-To: <aAii_iawJdptQyCt@stanley.mountain>
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
On Wed, Apr 23, 2025 at 11:21:18AM +0300, Dan Carpenter wrote:
> When the list_for_each_entry_reverse() exits without hitting a break
> then the list cursor points to invalid memory. So this check for
> if (c2a->fixed) is checking bogus memory. Fix it by using a "found"
> variable to track if we found what we were looking for or not.
>
> Fixes: c3f55241882b ("i2c: Support dynamic address translation")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Applied to for-next with Tomi's description added, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-05-02 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 8:21 [PATCH next] i2c: Fix end of loop test in i2c_atr_find_mapping_by_addr() Dan Carpenter
2025-04-23 15:25 ` Romain Gantois
2025-04-23 17:29 ` Dan Carpenter
2025-04-24 6:32 ` Tomi Valkeinen
2025-04-24 7:10 ` Romain Gantois
2025-04-30 12:25 ` Luca Ceresoli
2025-05-02 14:40 ` Wolfram Sang [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=aBTZXsMJK3lsiUiU@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=andi.shyti@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=romain.gantois@bootlin.com \
--cc=tomi.valkeinen@ideasonboard.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