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: <487B5F85-0D9F-42B3-B9EB-E3DCFB09A35D@bamaicloud.com>
Date: Fri, 16 Jan 2026 10:45:44 +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>,
 Nikolay Aleksandrov <razor@...ckwall.org>,
 Hangbin Liu <liuhangbin@...il.com>,
 Jason Xing <kerneljasonxing@...il.com>
Subject: Re: [PATCH RESEND net-next v4 1/4] net: bonding: use workqueue to
 make sure peer notify updated in lacp mode



> On Jan 15, 2026, at 18:46, Paolo Abeni <pabeni@...hat.com> wrote:
> 
> On 1/12/26 3:40 AM, Tonghao Zhang wrote:
>> +static void bond_peer_notify_handler(struct work_struct *work)
>> +{
>> + struct bonding *bond = container_of(work, struct bonding,
>> +    peer_notify_work.work);
>> +
>> + if (!rtnl_trylock()) {
>> + bond_peer_notify_work_rearm(bond, 1);
>> + return;
>> + }
>> +
>> + bond_peer_notify_reset(bond);
>> +
>> + rtnl_unlock();
>> + return;
> 
> I'm sorry for nit picking, but this is a bit ugly: please remove the
> `return;` statement above.
oops, ok, thanks.
> 
>> @@ -1279,19 +1306,17 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
>> bond_do_fail_over_mac(bond, new_active,
>>      old_active);
>> 
>> + call_netdevice_notifiers(NETDEV_BONDING_FAILOVER, bond->dev);
>> +
>> if (netif_running(bond->dev)) {
>> - bond->send_peer_notif =
>> - bond->params.num_peer_notif *
>> - max(1, bond->params.peer_notif_delay);
>> - should_notify_peers =
>> - bond_should_notify_peers(bond);
>> - }
>> + bond_peer_notify_reset(bond);
>> 
>> - call_netdevice_notifiers(NETDEV_BONDING_FAILOVER, bond->dev);
>> - if (should_notify_peers) {
>> - bond->send_peer_notif--;
>> - call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
>> - bond->dev);
>> + if (bond_should_notify_peers(bond)) {
>> + bond->send_peer_notif--;
>> + call_netdevice_notifiers(
>> + NETDEV_NOTIFY_PEERS,
>> + bond->dev);
> 
> Since a repost is needed, plase move this if block to a separate helper
> to reduce indentation and avoid bad formatting.
ok
> 
> Thanks,
> 
> Paolo
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ