]> git.baikalelectronics.ru Git - kernel.git/commit
ice: synchronize_rcu() when terminating rings
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Thu, 17 Mar 2022 18:36:27 +0000 (19:36 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 5 Apr 2022 16:07:08 +0000 (09:07 -0700)
commite9d19e9650189363066ff4d8b1b8173abf16596a
tree22b46000d1aa610efc239e7077a96954527d6c61
parent396f6836775e37e5ba4953ffa217d4ed30379714
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 commit 8ea5bfcc431c ("net/i40e: Fix concurrency issues
between config flow and XSK")

Fixes: 222ff8e45f21 ("ice: Add support for XDP")
Fixes: a40d09f79c37 ("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>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_xsk.c