Re: [PATCH next] i2c: Fix end of loop test in i2c_atr_find_mapping_by_addr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Applied to for-next with Tomi's description added, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux