ice: synchronize_rcu() when terminating rings
Unfortunately, the ice driver doesn't respect the RCU critical section that XSK wakeup is surrounded with. To fix this, add synchronize_rcu() calls to paths that destroy resources that might be in use. This was addressed in other AF_XDP ZC enabled drivers, for reference see for example commitb3873a5be7("net/i40e: Fix concurrency issues between config flow and XSK") Fixes:efc2214b60("ice: Add support for XDP") Fixes:2d4238f556("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: Shwetha Nagaraju <shwetha.nagaraju@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
committed by
Tony Nguyen
parent
1158f79f82
commit
f9124c68f0
@@ -2758,8 +2758,10 @@ free_qmap:
|
||||
|
||||
ice_for_each_xdp_txq(vsi, i)
|
||||
if (vsi->xdp_rings[i]) {
|
||||
if (vsi->xdp_rings[i]->desc)
|
||||
if (vsi->xdp_rings[i]->desc) {
|
||||
synchronize_rcu();
|
||||
ice_free_tx_ring(vsi->xdp_rings[i]);
|
||||
}
|
||||
kfree_rcu(vsi->xdp_rings[i], rcu);
|
||||
vsi->xdp_rings[i] = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user