diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-27 00:41:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-08 21:12:40 +0300 |
commit | aa5040691cb761a04c206a893e5771a904d22ab7 (patch) | |
tree | 1a1fa47a2dfcb1f13bd113de2f6a39c45d865198 /net/unix/af_unix.c | |
parent | 82a82ad92746e8672c6212fc0f94e02cae1885d2 (diff) | |
download | linux-aa5040691cb761a04c206a893e5771a904d22ab7.tar.xz |
bpf: Use u64_stats_t in struct bpf_prog_stats
[ Upstream commit 61a0abaee2092eee69e44fe60336aa2f5b578938 ]
Commit 316580b69d0a ("u64_stats: provide u64_stats_t type")
fixed possible load/store tearing on 64bit arches.
For instance the following C code
stats->nsecs += sched_clock() - start;
Could be rightfully implemented like this by a compiler,
confusing concurrent readers a lot:
stats->nsecs += sched_clock();
// arbitrary delay
stats->nsecs -= start;
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211026214133.3114279-4-eric.dumazet@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions