From: Antonio Quartulli <antonio@openvpn.net>
To: Pavitra Jha <jhapavitra98@gmail.com>
Cc: sd@queasysnail.net, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] ovpn: fix peer refcount leak in TCP error paths
Date: Fri, 22 May 2026 11:21:22 +0200 [thread overview]
Message-ID: <2a191e9f-f86c-4f1c-9f76-e0a7557ce51a@openvpn.net> (raw)
In-Reply-To: <20260522091718.270956-1-jhapavitra98@gmail.com>
Hi,
On 22/05/2026 11:17, Pavitra Jha wrote:
> diff --git a/drivers/net/ovpn/tcp.c b/drivers/net/ovpn/tcp.c
> index d651ce85c..2c7d830e7 100644
> --- a/drivers/net/ovpn/tcp.c
> +++ b/drivers/net/ovpn/tcp.c
> @@ -283,9 +283,9 @@ static void ovpn_tcp_send_sock(struct ovpn_peer *peer, struct sock *sk)
> /* in case of TCP error we can't recover the VPN
> * stream therefore we abort the connection
> */
> - if (ovpn_peer_hold(peer))
> - if (!schedule_work(&peer->tcp.defer_del_work))
> - ovpn_peer_put(peer);
> + ovpn_peer_hold(peer);
> + if (!schedule_work(&peer->tcp.defer_del_work))
> + ovpn_peer_put(peer);
>
> /* we bail out immediately and keep tx_in_progress set
> * to true. This way we prevent more TX attempts
This patch now lacks the RX part.
Please wait 24h between submissions (i.e. before sending v3).
More comments may come in in the meantime.
Regards,
--
Antonio Quartulli
OpenVPN Inc.
prev parent reply other threads:[~2026-05-22 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 9:17 Pavitra Jha
2026-05-22 9:21 ` Antonio Quartulli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a191e9f-f86c-4f1c-9f76-e0a7557ce51a@openvpn.net \
--to=antonio@openvpn.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhapavitra98@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®