Message ID | 3101675d11beac0ffe16a86877f7f0c5166605f6.1718096691.git.tanggeliang@kylinos.cn |
---|---|
State | New |
Headers | show |
Series | Add F_SETFL for fcntl in test_sockmap | expand |
On Tue, 11 Jun 2024 17:13:34 +0800 Geliang Tang wrote: > tls_sw_recvmsg() doesn't work in nonblock mode, it returns -EAGAIN in > that case. This patch fixes it, always wait for receiving the next skb > for sk_redirect. Is this commit message basically saying "block in nonblock mode" or am I missing something? Either way you have to at least improve the commit message..
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 305a412785f5..d2558856ceeb 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2099,6 +2099,8 @@ int tls_sw_recvmsg(struct sock *sk, rxm->full_len = 0; if (err == __SK_DROP) consume_skb(skb); + if (err == __SK_REDIRECT && flags & MSG_DONTWAIT) + tls_rx_rec_wait(sk, psock, false, released); continue; } }