linux-stable/net/tls
Sabrina Dubroca 4e40e62496 tls: fix lockless read of strp->msg_ready in ->poll
[ Upstream commit 0844370f89 ]

tls_sk_poll is called without locking the socket, and needs to read
strp->msg_ready (via tls_strp_msg_ready). Convert msg_ready to a bool
and use READ_ONCE/WRITE_ONCE where needed. The remaining reads are
only performed when the socket is locked.

Fixes: 121dca784f ("tls: suppress wakeups unless we have a full record")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/0b7ee062319037cf86af6b317b3d72f7bfcd2e97.1713797701.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:32:40 +02:00
..
Kconfig
Makefile
tls.h tls: fix lockless read of strp->msg_ready in ->poll 2024-05-02 16:32:40 +02:00
tls_device.c tls: expand use of tls_cipher_desc in tls_set_device_offload 2023-08-27 17:17:41 -07:00
tls_device_fallback.c tls: expand use of tls_cipher_desc in tls_sw_fallback_init 2023-08-27 17:17:42 -07:00
tls_main.c mptcp: fix lockless access in subflow ULP diag 2024-03-01 13:35:02 +01:00
tls_proc.c
tls_strp.c tls: fix lockless read of strp->msg_ready in ->poll 2024-05-02 16:32:40 +02:00
tls_sw.c tls: get psock ref after taking rxlock to avoid leak 2024-04-10 16:35:43 +02:00
tls_toe.c
trace.c
trace.h