WSL2-Linux-Kernel/net/tls
Doron Roberts-Kedes fcf4793e27 tls: check RCV_SHUTDOWN in tls_wait_data
The current code does not check sk->sk_shutdown & RCV_SHUTDOWN.
tls_sw_recvmsg may return a positive value in the case where bytes have
already been copied when the socket is shutdown. sk->sk_err has been
cleared, causing the tls_wait_data to hang forever on a subsequent
invocation. Checking sk->sk_shutdown & RCV_SHUTDOWN, as in tcp_recvmsg,
fixes this problem.

Fixes: c46234ebb4 ("tls: RX path for ktls")
Acked-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-20 14:38:14 -07:00
..
Kconfig net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
Makefile net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
tls_device.c tls: Fix tls_device initialization 2018-05-10 17:54:20 -04:00
tls_device_fallback.c net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
tls_main.c Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
tls_sw.c tls: check RCV_SHUTDOWN in tls_wait_data 2018-07-20 14:38:14 -07:00