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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <AE75D960-0AFD-4F18-9B1F-1F693338C056@bamaicloud.com>
Date: Sun, 23 Nov 2025 21:30:19 +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>
Subject: Re: [PATCH net-next v2] net: bonding: use workqueue to make sure peer
 notify updated in lacp mode



> On Nov 20, 2025, at 20:42, Paolo Abeni <pabeni@...hat.com> wrote:
> 
> 
> On 11/20/25 1:33 PM, Paolo Abeni wrote:
>> On 11/18/25 10:03 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())
>>> + goto rearm;
>> 
>> Why trylock() here? This is process context, you could just call
>> 
>> rtnl_lock();
>> 
>> and no re-schedule.
> 
> Whoops, sorry, I lacked the context. ndo_close() will try to flush the
> work under the rtnl lock; the workqueue must not block on such lock to
> avoid deadlock.
> 
> Still a comment above would be nice/useful for future memory.
Yes, I will add a comment in bond_work_init_all(), so if others add new workqueue, they should see the reminder.
> 
> /P



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ