[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240326115948.GS403975@kernel.org>
Date: Tue, 26 Mar 2024 11:59:48 +0000
From: Simon Horman <horms@...nel.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Boris Pismenny <borisp@...dia.com>,
John Fastabend <john.fastabend@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net 4/4] tls: get psock ref after taking rxlock to avoid
leak
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@...asysnail.net>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists