diff options
| author | Hannes Reinecke <[email protected]> | 2023-07-26 19:15:54 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-07-28 02:49:35 +0000 |
| commit | 11863c6d440d34c4b967e517739b38a7e68ed092 (patch) | |
| tree | 8701ce0f7a4f8e31c1bd4bc4402605e0b862c2bf /net/tls/tls_main.c | |
| parent | selftests/net/tls: add test for MSG_EOR (diff) | |
| download | kernel-11863c6d440d34c4b967e517739b38a7e68ed092.tar.gz kernel-11863c6d440d34c4b967e517739b38a7e68ed092.zip | |
net/tls: Use tcp_read_sock() instead of ops->read_sock()
TLS resets the protocol operations, so the read_sock() callback might
be changed, too.
In this case using sock->ops->readsock() in tls_strp_read_copyin() will
enter an infinite recursion if the read_sock() callback is calling
tls_rx_rec_wait() which will call into sock->ops->readsock() via
tls_strp_read_copyin().
But as tls_strp_read_copyin() is supposed to produce data from the
consumed socket and that socket is always a TCP socket we can call
tcp_read_sock() directly without having to deal with callbacks.
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Jakub Kicinski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/tls/tls_main.c')
0 files changed, 0 insertions, 0 deletions
