Re: [PATCH net-next 0/4] u64_stats: Introduce u64_stats_copy()
Ido Schimmel <[email protected]>
| Newsgroups | gmane.linux.network.bridge |
|---|---|
| Message-ID | <20260121111635.GA447040__26590.4665387765$1768994647$gmane$org@shredder> |
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 <[email protected]>