diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-12-17 16:20:47 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-12-19 16:20:49 +0100 |
commit | c0fdccfd226a1424683d3000d9e08384391210a2 (patch) | |
tree | bc5d84b8543985f1b7c03f1ff1a2c6edc0306cdd /lib | |
parent | b3873a5be757b44d51af542a50a6f2a3b6f95284 (diff) | |
download | linux-c0fdccfd226a1424683d3000d9e08384391210a2.tar.bz2 |
net/ixgbe: Fix concurrency issues between config flow and XSK
Use synchronize_rcu to wait until the XSK wakeup function finishes
before destroying the resources it uses:
1. ixgbe_down already calls synchronize_rcu after setting __IXGBE_DOWN.
2. After switching the XDP program, call synchronize_rcu to let
ixgbe_xsk_wakeup exit before the XDP program is freed.
3. Changing the number of channels brings the interface down.
4. Disabling UMEM sets __IXGBE_TX_DISABLED before closing hardware
resources and resetting xsk_umem. Check that bit in ixgbe_xsk_wakeup to
avoid using the XDP ring when it's already destroyed. synchronize_rcu is
called from ixgbe_txrx_ring_disable.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191217162023.16011-5-maximmi@mellanox.com
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions