diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-05 17:30:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-13 10:08:20 +0200 |
commit | d6c066811921c8729ffef44714524357d314489e (patch) | |
tree | 91b0a6ee103bc1bf9f238c6bba4d8869e02c54e3 /net/unix/sysctl_net_unix.c | |
parent | d83787c26d211735496b0325df08cd4830afea6d (diff) |
gve: fix gve_get_stats()
[ Upstream commit 2f57d4975fa027eabd35fdf23a49f8222ef3abf2 ]
gve_get_stats() can report wrong numbers if/when u64_stats_fetch_retry()
returns true.
What is needed here is to sample values in temporary variables,
and only use them after each loop is ended.
Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Catherine Sullivan <csully@google.com>
Cc: Sagi Shahar <sagis@google.com>
Cc: Jon Olson <jonolson@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Luigi Rizzo <lrizzo@google.com>
Cc: Jeroen de Borst <jeroendb@google.com>
Cc: Tao Liu <xliutaox@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions