BPF List
 help / color / mirror / Atom feed
* [PATCH net 0/6][pull request] ice: fix synchronization between .ndo_bpf() and reset
@ 2024-09-03 18:30 Tony Nguyen
  2024-09-03 18:30 ` [PATCH net 1/6] ice: move netif_queue_set_napi to rtnl-protected sections Tony Nguyen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tony Nguyen @ 2024-09-03 18:30 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, larysa.zaremba, wojciech.drewek, michal.kubiak,
	jacob.e.keller, amritha.nambiar, przemyslaw.kitszel,
	sridhar.samudrala, maciej.fijalkowski, magnus.karlsson, ast,
	daniel, hawk, john.fastabend, bpf

Larysa Zaremba says:

PF reset can be triggered asynchronously, by tx_timeout or by a user. With some
unfortunate timings both ice_vsi_rebuild() and .ndo_bpf will try to access and
modify XDP rings at the same time, causing system crash.

The first patch factors out rtnl-locked code from VSI rebuild code to avoid
deadlock. The following changes lock rebuild and .ndo_bpf() critical sections
with an internal mutex as well and provide complementary fixes.
---
IWL: https://lore.kernel.org/intel-wired-lan/20240823095933.17922-1-larysa.zaremba@intel.com/

The following are changes since commit cfd433cecef929b4d92685f570f1a480762ec260:
  Merge branch 'ptp-ocp-fix-serial-port-information-export'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE

Larysa Zaremba (6):
  ice: move netif_queue_set_napi to rtnl-protected sections
  ice: protect XDP configuration with a mutex
  ice: check for XDP rings instead of bpf program when unconfiguring
  ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset
  ice: remove ICE_CFG_BUSY locking from AF_XDP code
  ice: do not bring the VSI up, if it was down before the XDP setup

 drivers/net/ethernet/intel/ice/ice.h      |   2 +
 drivers/net/ethernet/intel/ice/ice_base.c |  11 +-
 drivers/net/ethernet/intel/ice/ice_lib.c  | 179 ++++++++--------------
 drivers/net/ethernet/intel/ice/ice_lib.h  |  10 +-
 drivers/net/ethernet/intel/ice/ice_main.c |  47 ++++--
 drivers/net/ethernet/intel/ice/ice_xsk.c  |  18 +--
 6 files changed, 106 insertions(+), 161 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-05  2:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 18:30 [PATCH net 0/6][pull request] ice: fix synchronization between .ndo_bpf() and reset Tony Nguyen
2024-09-03 18:30 ` [PATCH net 1/6] ice: move netif_queue_set_napi to rtnl-protected sections Tony Nguyen
2024-09-03 18:30 ` [PATCH net 2/6] ice: protect XDP configuration with a mutex Tony Nguyen
2024-09-03 18:30 ` [PATCH net 3/6] ice: check for XDP rings instead of bpf program when unconfiguring Tony Nguyen
2024-09-03 18:30 ` [PATCH net 4/6] ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset Tony Nguyen
2024-09-03 18:30 ` [PATCH net 5/6] ice: remove ICE_CFG_BUSY locking from AF_XDP code Tony Nguyen
2024-09-03 18:30 ` [PATCH net 6/6] ice: do not bring the VSI up, if it was down before the XDP setup Tony Nguyen
2024-09-05  2:10 ` [PATCH net 0/6][pull request] ice: fix synchronization between .ndo_bpf() and reset patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox