lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <18630C3F-88B0-4A28-BFE7-D53BCDD8F255@bamaicloud.com>
Date: Thu, 16 Oct 2025 20:56:19 +0800
From: Tonghao Zhang <tonghao@...aicloud.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org,
 Jay Vosburgh <jv@...sburgh.net>,
 "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>,
 Jonathan Corbet <corbet@....net>,
 Andrew Lunn <andrew+netdev@...n.ch>,
 Nikolay Aleksandrov <razor@...ckwall.org>,
 Jiri Slaby <jirislaby@...nel.org>,
 stable@...r.kernel.org
Subject: Re: [PATCH] net: bonding: update the slave array for broadcast mode



> On Oct 16, 2025, at 13:51, Hangbin Liu <liuhangbin@...il.com> wrote:
> 
> Hi Tonghao,
> 
> Please add the target repo in the subject. e.g.
> 
> [PATCH net] net: bonding: update the slave array for broadcast mode
V2 is post with target repo and fix typo in comment.
Thanks.
> 
> The patch looks good to me.
> 
> On Wed, Oct 15, 2025 at 08:58:08PM +0800, Tonghao Zhang wrote:
>> This patch fixes ce7a381697cb ("net: bonding: add broadcast_neighbor option for 802.3ad").
>> Before this commit, on the broadcast mode, all devices were traversed using the
>> bond_for_each_slave_rcu. This patch supports traversing devices by using all_slaves.
>> Therefore, we need to update the slave array when enslave or release salve.
>> 
>> Fixes: ce7a381697cb ("net: bonding: add broadcast_neighbor option for 802.3ad")
>> Cc: Jay Vosburgh <jv@...sburgh.net>
>> Cc: "David S. Miller" <davem@...emloft.net>
>> Cc: Eric Dumazet <edumazet@...gle.com>
>> Cc: Jakub Kicinski <kuba@...nel.org>
>> Cc: Paolo Abeni <pabeni@...hat.com>
>> Cc: Simon Horman <horms@...nel.org>
>> Cc: Jonathan Corbet <corbet@....net>
>> Cc: Andrew Lunn <andrew+netdev@...n.ch>
>> Cc: Nikolay Aleksandrov <razor@...ckwall.org>
>> Cc: Hangbin Liu <liuhangbin@...il.com>
>> Cc: Jiri Slaby <jirislaby@...nel.org>
>> Cc: <stable@...r.kernel.org>
>> Signed-off-by: Tonghao Zhang <tonghao@...aicloud.com>
>> ---
>> drivers/net/bonding/bond_main.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 17c7542be6a5..2d6883296e32 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -2384,7 +2384,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
>> unblock_netpoll_tx();
>> }
>> 
>> - if (bond_mode_can_use_xmit_hash(bond))
>> + /* broadcast mode uses the all_slaves to loop through slaves. */
>> + if (bond_mode_can_use_xmit_hash(bond) ||
>> +    BOND_MODE(bond) == BOND_MODE_BROADCAST)
>> bond_update_slave_arr(bond, NULL);
>> 
>> if (!slave_dev->netdev_ops->ndo_bpf ||
>> @@ -2560,7 +2562,8 @@ static int __bond_release_one(struct net_device *bond_dev,
>> 
>> bond_upper_dev_unlink(bond, slave);
>> 
>> - if (bond_mode_can_use_xmit_hash(bond))
>> + if (bond_mode_can_use_xmit_hash(bond) ||
>> +    BOND_MODE(bond) == BOND_MODE_BROADCAST)
>> bond_update_slave_arr(bond, slave);
>> 
>> slave_info(bond_dev, slave_dev, "Releasing %s interface\n",
>> -- 
>> 2.34.1
>> 
> 
> Reviewed-by: Hangbin Liu <liuhangbin@...il.com>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ