[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0b9e0c0e-9684-495f-ba30-9fc77b7b33b5@redhat.com>
Date: Thu, 20 Nov 2025 13:42:47 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Tonghao Zhang <tonghao@...aicloud.com>, netdev@...r.kernel.org
Cc: 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 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.
/P
Powered by blists - more mailing lists