linux-stable/net/tls
Sabrina Dubroca b565d294e3 tls: get psock ref after taking rxlock to avoid leak
[ Upstream commit 417e91e856 ]

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: 4cbc325ed6 ("tls: rx: allow only one reader at a time")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/fe2ade22d030051ce4c3638704ed58b67d0df643.1711120964.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:37:57 +02:00
..
Kconfig
Makefile
tls.h tls: don't reset prot->aad_size and prot->tail_size for TLS_HW 2023-10-23 10:15:09 -07:00
tls_device.c tls: don't reset prot->aad_size and prot->tail_size for TLS_HW 2023-10-23 10:15:09 -07:00
tls_device_fallback.c tls: rename MAX_IV_SIZE to TLS_MAX_IV_SIZE 2023-10-13 11:26:09 +01:00
tls_main.c mptcp: fix lockless access in subflow ULP diag 2024-02-18 10:25:00 +00:00
tls_proc.c
tls_strp.c
tls_sw.c tls: get psock ref after taking rxlock to avoid leak 2024-04-10 16:37:57 +02:00
tls_toe.c
trace.c
trace.h