Re: [PATCH 4.19 011/120] tcp: annotate tp->copied_seq lockless reads

From: Greg KH
Date: Tue Mar 16 2021 - 05:49:39 EST


On Tue, Mar 16, 2021 at 10:41:37AM +0100, Pavel Machek wrote:
> Hi!
>
> > From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> >
> > From: Eric Dumazet <edumazet@xxxxxxxxxx>
>
> Two From: fields here.

This is a side-affect of me using git-send-email to talk to the remote
smtp server directly instead of using my local email server. This was
done to increase the speed of sending these patches out as
git-send-email can pipeline messages instead of having msmtp do a
setup/send/teardown on every individual message sent.

These are not in the patches themselves and I will work to figure out
if this can be fixed. Gotta be a setting somewhere...

>
> > [ Upstream commit 7db48e983930285b765743ebd665aecf9850582b ]
> >
> > There are few places where we fetch tp->copied_seq while
> > this field can change from IRQ or other cpu.
>
> And there are few such places even after the patch is applied; I
> quoted them below.
>
> Doing addition to variable without locking... is kind of
> interesting. Are you sure it is okay?

Why isn't it?

thanks,

greg k-h