Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

From: Antonio Quartulli
Date: Thu Feb 13 2025 - 14:47:03 EST


Hi Sean,

On 13/02/2025 15:26, Sean Anderson wrote:
Hi Antonio,

On 2/10/25 19:39, Antonio Quartulli wrote:
NOTE: TCP tests are still showing the following warning while running
iperf.
I have analysed the report several times, but it definitely looks like
a false positive to me, so nothing to worry about.

Basically the lockdep engine gets confused thinking that we are
acquiring the lock twice on the same sock, but actually:
1) the kernel is first locking the 'iperf' (user) TCP socket;
2) ovpn is later locking the underlying TCP trasport socket.

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 think you can use a "nested" lock to avoid this. See e.g. commit
86a41ea9fd79 ("l2tp: fix lockdep splat") for an example.

Thanks a lot for this pointer.
By reading the commit message it seems I am hitting the very same "issue".

I will try to port the same solution to ovpn then :)

Thanks again!

Regards,


--Sean

[1] https://www.kernel.org/doc/html/latest/locking/lockdep- design.html#exception-nested-data-dependencies-leading-to-nested-locking

--
Antonio Quartulli
OpenVPN Inc.