linux-stable/net/tls
Sabrina Dubroca 31e10d6cb0 tls: stop recv() if initial process_rx_list gave us non-DATA
[ Upstream commit fdfbaec592 ]

If we have a non-DATA record on the rx_list and another record of the
same type still on the queue, we will end up merging them:
 - process_rx_list copies the non-DATA record
 - we start the loop and process the first available record since it's
   of the same type
 - we break out of the loop since the record was not DATA

Just check the record type and jump to the end in case process_rx_list
did some work.

Fixes: 692d7b5d1f ("tls: Fix recvmsg() to be able to peek across multiple records")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/bd31449e43bd4b6ff546f5c51cf958c31c511deb.1708007371.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:16:51 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
tls_device.c net/tls: Remove the context from the list in tls_device_down 2022-08-03 12:00:46 +02:00
tls_device_fallback.c net/tls: Fix use-after-free after the TLS device goes down and up 2021-06-10 13:39:18 +02:00
tls_main.c mptcp: fix lockless access in subflow ULP diag 2024-03-01 13:16:49 +01:00
tls_proc.c net: fix proc_fs init handling in af_packet and tls 2021-02-23 15:53:23 +01:00
tls_sw.c tls: stop recv() if initial process_rx_list gave us non-DATA 2024-03-01 13:16:51 +01:00
tls_toe.c
trace.c
trace.h