linux/drivers/net/bonding
Jianbo Liu bfbf576f29 bonding: implement xdo_dev_state_free and call it after deletion
[ Upstream commit ec13009472 ]

Add this implementation for bonding, so hardware resources can be
freed from the active slave after xfrm state is deleted. The netdev
used to invoke xdo_dev_state_free callback, is saved in the xfrm state
(xs->xso.real_dev), which is also the bond's active slave. To prevent
it from being freed, acquire netdev reference before leaving RCU
read-side critical section, and release it after callback is done.

And call it when deleting all SAs from old active real interface while
switching current active slave.

Fixes: 9a5605505d ("bonding: Add struct bond_ipesc to manage SA")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Jay Vosburgh <jv@jvosburgh.net>
Link: https://patch.msgid.link/20240823031056.110999-2-jianbol@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-09-04 13:25:02 +02:00
..
bond_3ad.c drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-12 12:02:28 +01:00
bond_alb.c bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk 2024-02-05 20:12:50 +00:00
bond_debugfs.c bonding: fix error checking in bond_debug_reregister() 2023-02-14 19:11:44 +01:00
bond_main.c bonding: implement xdo_dev_state_free and call it after deletion 2024-09-04 13:25:02 +02:00
bond_netlink.c bonding: fix send_peer_notif overflow 2023-05-24 17:32:32 +01:00
bond_options.c bonding: fix xfrm state handling when clearing active slave 2024-08-29 17:30:45 +02:00
bond_procfs.c bonding: show NS IPv6 targets in proc master info 2022-05-31 10:50:02 +02:00
bond_sysfs.c net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
bond_sysfs_slave.c net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
bonding_priv.h drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00