On 13/02/2025 00:34, Sabrina Dubroca wrote:
Hello,
2025-02-11, 01:39:53 +0100, Antonio Quartulli wrote:
All minor and major reported problems have been finally addressed.
Big thanks to Sabrina, who took the time to guide me through
converting the peer socket to an RCU pointer.
Something is off (not sure if it's new to this version): if I use
test-tcp.sh to setup a set of interfaces and peers (I stop the test
just after setup to keep the environment alive), then remove all netns
with "ip -all netns delete", I expect all devices to go away, but they
don't. With debug messages enabled I'm seeing some activity from the
module ("tun0: sending keepalive to peer 3" and so on), and
ovpn_net_uninit/ovpn_priv_free never got called.
I can reproduce it. If later I rmmod ovpn I then get all the "Deleting
peer" messages.
So instances are not being purged on netns exit.
Will dive into it.
[...]
So there is NO risk of deadlock (and indeed nothing hangs), but I
couldn't find a way to make the warning go away.
I've spotted another splat on strparser cleanup that looked like an
actual deadlock, but it's not very reproducible. Still looking into
it, but I'm not convinced it's ok to call strp_done (as is done from
ovpn_tcp_socket_detach) while under lock_sock, because AFAIU
cancel_work_sync(&strp->work) may be waiting for a work that needs to
lock the socket (cb.lock in do_strp_work). I guess tcp_tx_work would
have the same problem.
Will have a look here too.
Thanks!
--
Antonio Quartulli
OpenVPN Inc.