Re: [PATCH 2/2] tls: return a distinct error for control records from read_sock

From
Jakub Kicinski <kuba@kernel.org>
Date
2026-09-23 00:56:57
Also in
linux-nvme
Reply to
Hannes Reinecke, 2026-09-22
On Tue, 22 Sep 2026 15:37:08 +0200 Hannes Reinecke wrote:
tls_sw_read_sock() leaves a non-data record on the receive list and
returns -EINVAL. The same function returns -EINVAL when an sk_psock is
attached, and an actor may return it for other reasons, so callers
cannot determine whether a control record is waiting.

Return -EPROTO instead. The record can then be read with recvmsg()
and a control buffer, which reports its type.
Please run the selftests.
-- 
pw-bot: cr
Thread (4 messages) 4 messages, 2 authors, last reply 2026-09-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help