linux/drivers/net/team
Jakub Kicinski a6882c1583 net: team: don't recurse on the port's netdev ops lock
__team_port_change_send() calls __ethtool_get_link_ksettings() on
the port, which will soon take the port's ops lock. The notifier
caller already holds it while the slave-add/del callers do not,
so the function would either deadlock or run unprotected depending
on the path.

Make __team_port_change_send() expect the port's ops lock held and
switch to netif_get_link_ksettings(). team_device_event()'s NETDEV_UP /
NETDEV_CHANGE already arrive with the port's ops lock held.
team_port_add() now take it explicitly.

Note that NETDEV_DOWN and team_port_del() will pass false as @linkup
so they will not execute netif_get_link_ksettings(). This is fortunate
as NETDEV_DOWN has somewhat mixed locking right now.

Link: https://patch.msgid.link/20260603012840.2254293-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-04 14:04:55 -07:00
..
Kconfig
Makefile net: team: use policy generated by YAML spec 2024-04-02 18:24:32 -07:00
team_core.c net: team: don't recurse on the port's netdev ops lock 2026-06-04 14:04:55 -07:00
team_mode_activebackup.c team: replace team lock with rtnl lock 2025-06-25 15:23:06 -07:00
team_mode_broadcast.c team: remove unreferenced header in broadcast and roundrobin files 2023-08-08 15:04:04 -07:00
team_mode_loadbalance.c net: team: Track rx enablement separately from tx enablement 2026-04-13 15:09:49 +02:00
team_mode_random.c net: team: Rename enablement functions and struct members to tx 2026-04-13 15:09:49 +02:00
team_mode_roundrobin.c net: team: Rename enablement functions and struct members to tx 2026-04-13 15:09:49 +02:00
team_nl.c tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00
team_nl.h tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00