Re: [PATCH v3] i2c: i801: fix potential race in i801_block_transaction_byte_by_byte

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

 



On Sat, Sep 09, 2023 at 10:25:06PM +0200, Heiner Kallweit wrote:
> Currently we set SMBHSTCNT_LAST_BYTE only after the host has started
> receiving the last byte. If we get e.g. preempted before setting
> SMBHSTCNT_LAST_BYTE, the host may be finished with receiving the byte
> before SMBHSTCNT_LAST_BYTE is set.
> Therefore change the code to set SMBHSTCNT_LAST_BYTE before writing
> SMBHSTSTS_BYTE_DONE for the byte before the last byte. Now the code
> is also consistent with what we do in i801_isr_byte_done().
> 
> Reported-by: Jean Delvare <jdelvare@xxxxxxxx>
> Closes: https://lore.kernel.org/linux-i2c/20230828152747.09444625@endymion.delvare/
> Cc: stable@xxxxxxxxxxxxxxx
> Acked-by: Andi Shyti <andi.shyti@xxxxxxxxxx>
> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>

Applied to for-next, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux