[PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock"

Geliang Tang posted 2 patches 6 months ago
[PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock"
Posted by Geliang Tang 6 months ago
From: Geliang Tang <tanggeliang@kylinos.cn>

Use sk->sk_rcvbuf instead of INT_MAX as the max len.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 32d389329262..53057c4f41f0 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3965,8 +3965,8 @@ static int mptcp_read_sock(struct sock *sk, read_descriptor_t *desc,
 {
 	struct mptcp_sock *msk = mptcp_sk(sk);
 	struct scm_timestamping_internal tss;
+	size_t len = sk->sk_rcvbuf;
 	struct sk_buff *skb, *tmp;
-	size_t len = INT_MAX;
 	int copied = 0;
 
 	if (sk->sk_state == TCP_LISTEN)
-- 
2.43.0