All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net 0/6] ice: fix DCB lock ordering
@ 2026-11-02 10:50 Przemek Kitszel
  2026-11-02 10:49 ` netdev-bot+sinfo
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Przemek Kitszel @ 2026-11-02 10:50 UTC (permalink / raw)
  To: intel-wired-lan, Petr Oros; +Cc: netdev, Przemek Kitszel

Fix deadlocks and lock inversions around ice DCB configuration, between
RTNL, pf->tc_mutex, the PF devlink lock and pf->vfs.table_lock.

RTNL becomes the outer lock of all DCB configuration paths. dcbnl ops
and ndo_setup_tc() already run under it; patch 2 makes the LLDP MIB
change handler and ice_dcb_rebuild() take it too, so patch 5 can drop
the now redundant pf->tc_mutex. Patch 1 goes first, so that a dcbnl op
does not wait out a reset, whose rebuild now needs RTNL.

Enabling DCB in switchdev tears down the devlink-rate tree, which needs
the PF devlink lock and pf->vfs.table_lock, both taken before RTNL
elsewhere. Patch 4 only tries them, and only when a tree is exported,
which it tells by rate_node pointers, no longer left dangling by patch 3.

Patch 6 is an unrelated fix of the ice_init_lag() error path.

Reproducers are in the commit messages, each verified to trigger the
lockdep or KASAN report before its fix and not after it.

Petr's "ice: fix RTNL vs auxiliary device lock inversion" [0] touches
the same ice_setup_tc() and ice_pf_dcb_cfg() code, so one of the series
needs a rebase. With this one applied first, his patch 2 is not needed.
[0] https://lore.kernel.org/intel-wired-lan/20261023070258.730168-1-poros@redhat.com



Przemek Kitszel (6):
  ice: don't wait out a reset in ice_dcbnl_devreset()
  ice: take rtnl before tc_mutex in DCB MIB change and rebuild
  ice: clear stale rate_node pointers in
    ice_tear_down_devlink_rate_tree()
  ice: don't block on locks in ice_tear_down_devlink_rate_tree()
  ice: replace tc_mutex with RTNL
  ice: register LAG event handler last in ice_init_lag()

 .../net/ethernet/intel/ice/devlink/devlink.h  |  2 +-
 drivers/net/ethernet/intel/ice/ice.h          |  1 -
 drivers/net/ethernet/intel/ice/ice_dcb_lib.h  |  1 +
 .../net/ethernet/intel/ice/devlink/devlink.c  | 52 +++++++++++++++++--
 drivers/net/ethernet/intel/ice/ice_dcb_lib.c  | 46 ++++++++++------
 drivers/net/ethernet/intel/ice/ice_dcb_nl.c   | 35 ++++++-------
 drivers/net/ethernet/intel/ice/ice_lag.c      | 15 +++---
 drivers/net/ethernet/intel/ice/ice_main.c     |  8 ++-
 8 files changed, 108 insertions(+), 52 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-11-05 18:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 10:50 [PATCH iwl-net 0/6] ice: fix DCB lock ordering Przemek Kitszel
2026-11-02 10:49 ` netdev-bot+sinfo
2026-11-02 10:50 ` [PATCH iwl-net 1/6] ice: don't wait out a reset in ice_dcbnl_devreset() Przemek Kitszel
2026-11-02 10:50 ` [PATCH iwl-net 2/6] ice: take rtnl before tc_mutex in DCB MIB change and rebuild Przemek Kitszel
2026-11-02 10:50 ` [PATCH iwl-net 3/6] ice: clear stale rate_node pointers in ice_tear_down_devlink_rate_tree() Przemek Kitszel
2026-11-02 10:50 ` [PATCH iwl-net 4/6] ice: don't block on locks " Przemek Kitszel
2026-11-02 10:50 ` [PATCH iwl-net 5/6] ice: replace tc_mutex with RTNL Przemek Kitszel
2026-11-02 10:50 ` [PATCH iwl-net 6/6] ice: register LAG event handler last in ice_init_lag() Przemek Kitszel
2026-11-03 11:23   ` Loktionov, Aleksandr
2026-11-03 12:42     ` Przemek Kitszel
2026-11-05 18:42       ` Jacob Keller
2026-11-05 18:46 ` [PATCH iwl-net 0/6] ice: fix DCB lock ordering Jacob Keller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.