[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c114fd0-4665-40ae-8a62-bbf69904e87f@openvpn.net>
Date: Fri, 17 Jan 2025 13:26:26 +0100
From: Antonio Quartulli <antonio@...nvpn.net>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Donald Hunter <donald.hunter@...il.com>, Shuah Khan <shuah@...nel.org>,
ryazanov.s.a@...il.com, Andrew Lunn <andrew+netdev@...n.ch>,
Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, Xiao Liang <shaw.leon@...il.com>
Subject: Re: [PATCH net-next v18 05/25] ovpn: introduce the ovpn_peer object
On 17/01/2025 12:58, Sabrina Dubroca wrote:
> 2025-01-13, 10:31:24 +0100, Antonio Quartulli wrote:
>> +static void ovpn_peer_release(struct ovpn_peer *peer)
>> +{
>> + ovpn_bind_reset(peer, NULL);
>> + netdev_put(peer->ovpn->dev, &peer->dev_tracker);
>
> I think this needs to move after the call_rcu. Otherwise, module
> unload could proceed (no more ref on the last ovpn netdevice), not see
> any pending work in the final rcu_barrier of ovpn_cleanup, and finish
> unloading. Then when ovpn_peer_release_rcu gets called, it's not there
> anymore.
ACK
will move netdev_put after call_rcu.
>
>> + call_rcu(&peer->rcu, ovpn_peer_release_rcu);
>> +}
>
--
Antonio Quartulli
OpenVPN Inc.
Powered by blists - more mailing lists