[PATCH 2/2] tls: return a distinct error for control records from read_sock
Jakub Kicinski
kuba at kernel.org
Tue Sep 22 17:56:51 PDT 2026
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
More information about the Linux-nvme
mailing list