On 29/06/2026 20:32, Eric Dumazet wrote:
Add READ_ONCE()/WRITE_ONCE() annotations on port->is_enabled.
While this field is written under bond->mode_lock protection,
is is read without this lock being held.
Change bond_fill_info() to acquire RCU and use READ_ONCE()
to read bond->params fields that can be updated concurrently
from sysfs/procfs/rtnetlink.
Add const qualifiers to bond_uses_primary(), __agg_active_ports(),
bond_option_active_slave_get_rcu(), bond_3ad_get_active_agg_info(),
__bond_3ad_get_active_agg_info() helpers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <jv@jvosburgh.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
---
v4: addressed Sashiko/Jakub feedback
drivers/net/bonding/bond_3ad.c | 24 ++++---
drivers/net/bonding/bond_netlink.c | 109 ++++++++++++++++-------------
drivers/net/bonding/bond_options.c | 8 +--
include/net/bond_3ad.h | 4 +-
include/net/bonding.h | 8 +--
5 files changed, 85 insertions(+), 68 deletions(-)
A bit late to the party but fwiw:
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Cheers,
Nik