summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@mellanox.com>2019-12-17 16:20:45 +0000
committerDaniel Borkmann <daniel@iogearbox.net>2019-12-19 16:20:49 +0100
commitb3873a5be757b44d51af542a50a6f2a3b6f95284 (patch)
tree5881ff638c61189cea401718fdc953a795f331f4 /drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
parent9cf88808ad6a0f1e958e00abd9a081295fe6da0c (diff)
downloadlinux-b3873a5be757b44d51af542a50a6f2a3b6f95284.tar.bz2
net/i40e: 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. i40e_down already calls synchronize_rcu. On i40e_down either __I40E_VSI_DOWN or __I40E_CONFIG_BUSY is set. Check the latter in i40e_xsk_wakeup (the former is already checked there). 2. After switching the XDP program, call synchronize_rcu to let i40e_xsk_wakeup exit before the XDP program is freed. 3. Changing the number of channels brings the interface down (see i40e_prep_for_reset and i40e_pf_quiesce_all_vsi). 4. Disabling UMEM sets __I40E_CONFIG_BUSY, too. 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-4-maximmi@mellanox.com
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c')
0 files changed, 0 insertions, 0 deletions