public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andi Shyti <andi.shyti@kernel.org>,
	Jean Delvare <jdelvare@suse.de>, Wolfram Sang <wsa@kernel.org>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2] i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
Date: Wed, 6 Sep 2023 09:50:17 +0100	[thread overview]
Message-ID: <2023090642-umbilical-travesty-6274@gregkh> (raw)
In-Reply-To: <55e8de0d-daf3-f398-0fc2-357b53c14bc8@gmail.com>

On Wed, Sep 06, 2023 at 08:05:59AM +0200, Heiner Kallweit wrote:
> On 06.09.2023 00:59, Andi Shyti wrote:
> > Hi Heiner,
> > 
> > On Tue, Sep 05, 2023 at 01:35:10PM +0200, Heiner Kallweit wrote:
> >> On 05.09.2023 11:11, Andi Shyti wrote:
> >>> Hi Jean,
> >>>
> >>> On Tue, Sep 05, 2023 at 10:12:43AM +0200, Jean Delvare wrote:
> >>>> On Sat, 02 Sep 2023 22:10:52 +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@suse.com>
> >>>>
> >>>> Note for Wolfram: checkpatch says we should insert here:
> >>>>
> >>>> Closes: https://lore.kernel.org/linux-i2c/20230828152747.09444625@endymion.delvare/
> >>>
> >>> does this also need a Fixes: tag? I tried to check it, but there
> >>> was an intricate jungle of commits in these lines.
> >>>
> >> Quoting Jean from previous communication about this patch:
> >> As far as I see, the race condition already existed when the kernel
> >> switched to git, so there's no point in having a Fixes statement.
> > 
> > true... I forgot about this comment.
> > 
> > Anyway I think that this should, then, go to all the stable
> > kernels and I believe that without the Fixes tag this will never
> > be picked up.
> > 
> 
> Then we may have to set the Fixes tag to the following?
> 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Plus a comment that the issue existed before already.
> 
> > Maybe Greg can advise here.
> > 
> I *think* Greg (or a bot of him) would complain when receiving
> something for stable w/o a Fixes tag.

No, fixes tags are not required, but they are nice.  For the full set of
rules on how to do this, please see:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html


  reply	other threads:[~2023-09-06  8:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 20:10 [PATCH v2] i2c: i801: fix potential race in i801_block_transaction_byte_by_byte Heiner Kallweit
2023-09-05  8:12 ` Jean Delvare
2023-09-05  9:11   ` Andi Shyti
2023-09-05 11:35     ` Heiner Kallweit
2023-09-05 22:59       ` Andi Shyti
2023-09-06  6:05         ` Heiner Kallweit
2023-09-06  8:50           ` Greg Kroah-Hartman [this message]
2023-09-06  8:07         ` Jean Delvare

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=2023090642-umbilical-travesty-6274@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andi.shyti@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@kernel.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