diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-12-17 16:20:45 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-12-19 16:20:49 +0100 |
commit | b3873a5be757b44d51af542a50a6f2a3b6f95284 (patch) | |
tree | 5881ff638c61189cea401718fdc953a795f331f4 /net | |
parent | 9cf88808ad6a0f1e958e00abd9a081295fe6da0c (diff) | |
download | linux-b3873a5be757b44d51af542a50a6f2a3b6f95284.tar.gz |
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 'net')
0 files changed, 0 insertions, 0 deletions