Re: [PATCH net] tls: check RCV_SHUTDOWN in tls_wait_data

2018-07-20 Thread David Miller
From: Doron Roberts-Kedes Date: Wed, 18 Jul 2018 16:22:27 -0700 > 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

[PATCH net] tls: check RCV_SHUTDOWN in tls_wait_data

2018-07-18 Thread Doron Roberts-Kedes
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