Thread (13 messages) 13 messages, 3 authors, 2026-01-22

Re: [PATCH net-next 0/4] u64_stats: Introduce u64_stats_copy()

From: Ido Schimmel <idosch@nvidia.com>
Date: 2026-01-21 11:16:58
Also in: bridge, lkml

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@nvidia.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help