On 04/12/2024 12:15, Antonio Quartulli wrote:
[...]
+static void ovpn_tcp_close(struct sock *sk, long timeout)
+{
+ struct ovpn_socket *sock;
+
+ rcu_read_lock();
+ sock = rcu_dereference_sk_user_data(sk);
+
+ strp_stop(&sock->peer->tcp.strp);
+ barrier();
Again, is not clear to me the role of the above barrier, please
document it.
Also taken from espintcp_close(), with the idea to avoid reordering
during the shut down sequence.
Will add a comment here too.
Actually, after checking this specific barrier(), I realized this is not
needed, because we are doing the socket detach later, after calling the
ovpn_peer_del() (which is different from what is happening in espintcp).
So I'll just drop this barrier here.
Regards,
--
Antonio Quartulli
OpenVPN Inc.