linux-stable/drivers/net/netdevsim
Sebastian Andrzej Siewior 278d3ba615 net: Use u64_stats_fetch_begin_irq() for stats fetch.
On 32bit-UP u64_stats_fetch_begin() disables only preemption. If the
reader is in preemptible context and the writer side
(u64_stats_update_begin*()) runs in an interrupt context (IRQ or
softirq) then the writer can update the stats during the read operation.
This update remains undetected.

Use u64_stats_fetch_begin_irq() to ensure the stats fetch on 32bit-UP
are not interrupted by a writer. 32bit-SMP remains unaffected by this
change.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Catherine Sullivan <csully@google.com>
Cc: David Awogbemila <awogbemila@google.com>
Cc: Dimitris Michailidis <dmichail@fungible.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jeroen de Borst <jeroendb@google.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <simon.horman@corigine.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: oss-drivers@corigine.com
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-08-29 13:02:27 +01:00
..
bpf.c netdevsim: Avoid allocation warnings triggered from user space 2022-07-29 14:57:26 -07:00
bus.c netdevsim: convert driver to use unlocked devlink API during init/fini 2022-07-18 20:10:48 -07:00
dev.c net: devlink: convert reload command to take implicit devlink->lock 2022-08-01 12:14:00 +01:00
ethtool.c
fib.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-08-03 09:04:55 +02:00
health.c
hwstats.c
ipsec.c netdevsim: rely on XFRM state direction instead of flags 2022-05-06 08:34:33 +02:00
Makefile
netdev.c net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-08-29 13:02:27 +01:00
netdevsim.h netdevsim: convert driver to use unlocked devlink API during init/fini 2022-07-18 20:10:48 -07:00
psample.c
udp_tunnels.c