Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3995727pxf; Tue, 16 Mar 2021 03:10:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiKxLld7CuTHTj1ixUa97feA/i8ru2HAdrMBMxVxSG5a+nuvKxviJdcKuf/tmTwMYyr0Xh X-Received: by 2002:a50:ec96:: with SMTP id e22mr35115323edr.385.1615889431592; Tue, 16 Mar 2021 03:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615889431; cv=none; d=google.com; s=arc-20160816; b=jwSldyHysEvE3GbqyHXgUMc5ikApSx0six4x+T7PMXyC9ViWg03qGhgBwsR1Z1vZzF PCY2ne+8QP0rnMFOq0QJU9xVobtfx7hraEVZSN45JqcvM0XwYA9DnWiea0TO/QvFk5/d KMniOdsiqFbbNQHgSE7PuS/eRnUFP3rN7R4z1G5kH9JQOaQRAHogK90wZBRfqQdeIU/Y BqTPbay/m44JpjEseo36u7HfIWws79TjtyT4BnzfnrxAWVWWeyiZ2RhrNb16KBBG8aHa 6pablCBDyey3u2jbxYW9Ct+rC8uznNyXUAwAQOg/cMxZYqGxtr2fbnXd7IRh5iwIE3cb NvOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FRPLJn6zr9rski3EDWa0gi/BIkZEUz8wMhYuXOziq04=; b=pbCoBB+kHqNLDE+8CoDgIHrkyeKcQj6iqRWWytQOuikiFVkFNK/W8OFJo8k4fEBSRz BiTAVzHJ/AVogZ3IJWwo+cSBkYW68fHKgxC8DSBktdGIsxP214OX5oQiE0IxUMIJN+cQ uAIu3LJWnYmgkNufegzVgwYzy+sdjjXbPU08vL3Hv7Y0NsHOpqN3mWHbTRZqIfogdi6U MoBxpBIIrnKCzxuaEeRrW0EEpKFy8a8nTFMTLyCKS7pN9gi3nIQmQUWYF0wfsHEPl0f4 hkdTXmxP3oNOxRHpBkECCOJebPUKZ9jUxrj4deQQYiNqtz8feP0xuJ7t2BwO1785MoDN SrhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu7si13287874ejb.27.2021.03.16.03.10.08; Tue, 16 Mar 2021 03:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236378AbhCPJxX (ORCPT + 99 others); Tue, 16 Mar 2021 05:53:23 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53216 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236376AbhCPJxU (ORCPT ); Tue, 16 Mar 2021 05:53:20 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0CF2A1C0B8B; Tue, 16 Mar 2021 10:53:18 +0100 (CET) Date: Tue, 16 Mar 2021 10:53:17 +0100 From: Pavel Machek To: Pavel Machek Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: Re: [PATCH 4.19 012/120] tcp: annotate tp->write_seq lockless reads Message-ID: <20210316095317.GC12946@amd> References: <20210315135720.002213995@linuxfoundation.org> <20210315135720.418426545@linuxfoundation.org> <20210316095049.GB12946@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wxDdMuZNg1r63Hyj" Content-Disposition: inline In-Reply-To: <20210316095049.GB12946@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wxDdMuZNg1r63Hyj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > From: Greg Kroah-Hartman > >=20 > > From: Eric Dumazet >=20 > 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 =3D ~0U; > > =20 > > tcp_init_xmit_timers(newsk); > > - newtp->write_seq =3D newtp->pushed_seq =3D treq->snt_isn + 1; > > + WRITE_ONCE(newtp->write_seq, newtp->pushed_seq =3D treq->snt_isn + 1); >=20 > Would it be better to do assignment to pushed_seq outside of > WRITE_ONCE macro? This is ... "interesting". Best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --wxDdMuZNg1r63Hyj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmBQgA0ACgkQMOfwapXb+vK3yQCeLJ+76EJmgJy2npJfJUko//zp ujEAnj3DgTZ/NUoQ/Zf94PQ/UJBlZxvO =aDh+ -----END PGP SIGNATURE----- --wxDdMuZNg1r63Hyj--