[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121111635.GA447040@shredder>
Date: Wed, 21 Jan 2026 13:16:35 +0200
From: Ido Schimmel <idosch@...dia.com>
To: David Yang <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org, Sabrina Dubroca <sd@...asysnail.net>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Simon Horman <horms@...nel.org>, Mark Bloch <mbloch@...dia.com>,
Petr Machata <petrm@...dia.com>,
Stanislav Fomichev <sdf@...ichev.me>,
Carolina Jubran <cjubran@...dia.com>,
Breno Leitao <leitao@...ian.org>,
Shigeru Yoshida <syoshida@...hat.com>, linux-kernel@...r.kernel.org,
bridge@...ts.linux.dev
Subject: Re: [PATCH net-next 0/4] u64_stats: Introduce u64_stats_copy()
On Tue, Jan 20, 2026 at 05:21:28PM +0800, David Yang wrote:
> On 64bit arches, struct u64_stats_sync is empty and provides no help
> against load/store tearing. memcpy() should not be considered atomic
> against u64 values. Use u64_stats_copy() instead.
The existing memcpy() does seem problematic (even if in practice it's
not) and the proposed solution in patch #1 seems OK to me given that all
the callers only pass structures containing 64 bit counters. Couldn't
find any more instances of this pattern.
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists