Messages in this thread | | | Date | Tue, 16 Mar 2021 10:53:17 +0100 | From | Pavel Machek <> | Subject | Re: [PATCH 4.19 012/120] tcp: annotate tp->write_seq lockless reads |
| |
Hi!
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > From: Eric Dumazet <edumazet@google.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 [unhandled content-type:application/pgp-signature] | |