All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org, Boris Pismenny <borisp@nvidia.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net 4/4] tls: get psock ref after taking rxlock to avoid leak
Date: Tue, 26 Mar 2024 11:59:48 +0000	[thread overview]
Message-ID: <20240326115948.GS403975@kernel.org> (raw)
In-Reply-To: <fe2ade22d030051ce4c3638704ed58b67d0df643.1711120964.git.sd@queasysnail.net>

On Mon, Mar 25, 2024 at 04:56:48PM +0100, Sabrina Dubroca wrote:
> At the start of tls_sw_recvmsg, we take a reference on the psock, and
> then call tls_rx_reader_lock. If that fails, we return directly
> without releasing the reference.
> 
> Instead of adding a new label, just take the reference after locking
> has succeeded, since we don't need it before.
> 
> Fixes: 4cbc325ed6b4 ("tls: rx: allow only one reader at a time")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2024-03-26 11:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 15:56 [PATCH net 0/4] tls: recvmsg fixes Sabrina Dubroca
2024-03-25 15:56 ` [PATCH net 1/4] tls: recv: process_rx_list shouldn't use an offset with kvec Sabrina Dubroca
2024-03-26 11:58   ` Simon Horman
2024-03-25 15:56 ` [PATCH net 2/4] tls: adjust recv return with async crypto and failed copy to userspace Sabrina Dubroca
2024-03-26 11:59   ` Simon Horman
2024-03-25 15:56 ` [PATCH net 3/4] selftests: tls: add test with a partially invalid iov Sabrina Dubroca
2024-03-26 11:59   ` Simon Horman
2024-03-25 15:56 ` [PATCH net 4/4] tls: get psock ref after taking rxlock to avoid leak Sabrina Dubroca
2024-03-26 11:59   ` Simon Horman [this message]
2024-03-27  4:09 ` [PATCH net 0/4] tls: recvmsg fixes patchwork-bot+netdevbpf

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=20240326115948.GS403975@kernel.org \
    --to=horms@kernel.org \
    --cc=borisp@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.