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: <FADC88E5-0A83-47E7-9B24-E8CDE61F0035@bamaicloud.com>
Date: Thu, 26 Jun 2025 23:14:03 +0800
From: Tonghao Zhang <tonghao@...aicloud.com>
To: Paolo Abeni <pabeni@...hat.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>,
 Simon Horman <horms@...nel.org>,
 Jonathan Corbet <corbet@....net>,
 Andrew Lunn <andrew+netdev@...n.ch>,
 Steven Rostedt <rostedt@...dmis.org>,
 Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Nikolay Aleksandrov <razor@...ckwall.org>,
 Zengbing Tu <tuzengbing@...iglobal.com>
Subject: Re: [net-next v7 3/3] net: bonding: send peer notify when failure
 recovery



> 2025年6月26日 21:41,Paolo Abeni <pabeni@...hat.com> 写道:
> 
> On 6/26/25 1:36 PM, Tonghao Zhang wrote:
>>> 2025年6月26日 19:16,Paolo Abeni <pabeni@...hat.com> 写道:
>>> 
>>> On 6/24/25 4:18 AM, Tonghao Zhang wrote:
>>>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>>>> index 12046ef51569..0acece55d9cb 100644
>>>> --- a/drivers/net/bonding/bond_main.c
>>>> +++ b/drivers/net/bonding/bond_main.c
>>>> @@ -1237,17 +1237,28 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
>>>> /* must be called in RCU critical section or with RTNL held */
>>>> static bool bond_should_notify_peers(struct bonding *bond)
>>>> {
>>>> - struct slave *slave = rcu_dereference_rtnl(bond->curr_active_slave);
>>>> + struct bond_up_slave *usable;
>>>> + struct slave *slave = NULL;
>>>> 
>>>> - if (!slave || !bond->send_peer_notif ||
>>>> + if (!bond->send_peer_notif ||
>>>>   bond->send_peer_notif %
>>>>   max(1, bond->params.peer_notif_delay) != 0 ||
>>>> -    !netif_carrier_ok(bond->dev) ||
>>>> -    test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state))
>>>> +    !netif_carrier_ok(bond->dev))
>>>> return false;
>>>> 
>>>> + if (BOND_MODE(bond) == BOND_MODE_8023AD) {
>>> 
>>> I still don't see why you aren't additionally checking
>>> broadcast_neighbor here. At least a code comment is necessary (or a code
>> checking broadcast_neighbor is unnecessary, because send_peer_notif is set when bond is in BOND_MODE_8023AD mode and broadcast_neighbor is enabled.
> 
> I see. send_peer_notif is cleared on mode changes, so we can't reach
> here with a non zero value after changing the mode to something else.
> 
> IMHO the scenario is not trivial, a comment here is deserved (at very
> least because I already asked it 3 times ;).
Ok, thanks Paolo.
> 
> Thanks,
> 
> Paolo



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ