public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] u64_stats: Introduce u64_stats_reads()
@ 2026-01-23 16:21 David Yang
  2026-01-23 16:21 ` [PATCH net-next v2 1/7] " David Yang
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: David Yang @ 2026-01-23 16:21 UTC (permalink / raw)
  To: netdev
  Cc: David Yang, Sabrina Dubroca, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Nikolay Aleksandrov,
	Ido Schimmel, Simon Horman, Aaron Conole, Eelco Chaudron,
	Ilya Maximets, Shigeru Yoshida, Stanislav Fomichev, Breno Leitao,
	Carolina Jubran, Kuniyuki Iwashima, Guillaume Nault, linux-kernel,
	bridge, dev

On 64bit arches, struct u64_stats_sync is empty and provides no help
against load/store tearing. memcpy() and struct copying should not be
considered tear-free. Use u64_stats_reads() instead.

v1: https://lore.kernel.org/r/20260120092137.2161162-1-mmyangfl@gmail.com
  - rename to u64_stats_reads() to clarify data flow direction
  - refine the implementation
  - add docs
  - fix struct copying too

David Yang (7):
  u64_stats: Introduce u64_stats_reads()
  u64_stats: Doc incorrect usage with plain variables
  net: bridge: mcast: fix memcpy with u64_stats
  net: openvswitch: fix load tearing with u64_stats
  macsec: fix memcpy with u64_stats
  mpls: Fix load tearing with u64_stats
  vxlan: vnifilter: fix memcpy with u64_stats

 drivers/net/macsec.c                |  6 ++--
 drivers/net/vxlan/vxlan_vnifilter.c |  2 +-
 include/linux/u64_stats_sync.h      | 56 ++++++++++++++++++++++++-----
 net/bridge/br_multicast.c           |  2 +-
 net/mpls/af_mpls.c                  |  2 +-
 net/openvswitch/datapath.c          |  3 +-
 6 files changed, 55 insertions(+), 16 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-26 19:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 16:21 [PATCH net-next v2 0/7] u64_stats: Introduce u64_stats_reads() David Yang
2026-01-23 16:21 ` [PATCH net-next v2 1/7] " David Yang
2026-01-23 16:21 ` [PATCH net-next v2 2/7] u64_stats: Doc incorrect usage with plain variables David Yang
2026-01-23 16:21 ` [PATCH net-next v2 3/7] net: bridge: mcast: fix memcpy with u64_stats David Yang
2026-01-23 16:21 ` [PATCH net-next v2 4/7] net: openvswitch: fix load tearing " David Yang
2026-01-24  0:49   ` kernel test robot
2026-01-26 12:25   ` Ilya Maximets
2026-01-26 18:29   ` David Laight
2026-01-26 18:35     ` Eric Dumazet
2026-01-26 19:18       ` David Laight
2026-01-23 16:21 ` [PATCH net-next v2 5/7] macsec: fix memcpy " David Yang
2026-01-23 16:21 ` [PATCH net-next v2 6/7] mpls: Fix load tearing " David Yang
2026-01-23 16:21 ` [PATCH net-next v2 7/7] vxlan: vnifilter: fix memcpy " David Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox