Skip to content
Commit fcf4793e authored by Doron Roberts-Kedes's avatar Doron Roberts-Kedes Committed by David S. Miller
Browse files

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: c46234eb ("tls: RX path for ktls")
Acked-by: default avatarDave Watson <davejwatson@fb.com>
Signed-off-by: default avatarDoron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7a6eb1e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment