[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210316095317.GC12946@amd>
Date: Tue, 16 Mar 2021 10:53:17 +0100
From: Pavel Machek <pavel@...x.de>
To: Pavel Machek <pavel@...x.de>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 4.19 012/120] tcp: annotate tp->write_seq lockless reads
Hi!
> > From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> >
> > From: Eric Dumazet <edumazet@...gle.com>
>
> Dup.
Aha, sorry, crossed mails. Still I wonder if hiding assignment into
macro is good:
> > --- a/net/ipv4/tcp_minisocks.c
> > +++ b/net/ipv4/tcp_minisocks.c
> > @@ -510,7 +510,7 @@ struct sock *tcp_create_openreq_child(co
> > newtp->app_limited = ~0U;
> >
> > tcp_init_xmit_timers(newsk);
> > - newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1;
> > + WRITE_ONCE(newtp->write_seq, newtp->pushed_seq = treq->snt_isn + 1);
>
> Would it be better to do assignment to pushed_seq outside of
> WRITE_ONCE macro? This is ... "interesting".
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists