[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3101675d11beac0ffe16a86877f7f0c5166605f6.1718096691.git.tanggeliang@kylinos.cn>
Date: Tue, 11 Jun 2024 17:13:34 +0800
From: Geliang Tang <geliang@...nel.org>
To: Andrii Nakryiko <andrii@...nel.org>,
Eduard Zingerman <eddyz87@...il.com>,
Mykola Lysenko <mykolal@...com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Boris Pismenny <borisp@...dia.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Jakub Sitnicki <jakub@...udflare.com>
Cc: Geliang Tang <tanggeliang@...inos.cn>,
bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH net-next v6 1/2] tls: wait for receiving next skb for sk_redirect
From: Geliang Tang <tanggeliang@...inos.cn>
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.
Signed-off-by: Geliang Tang <tanggeliang@...inos.cn>
---
net/tls/tls_sw.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
}
--
2.43.0
Powered by blists - more mailing lists