Squash to "implement mptcp read_sock"
Subsystems (3)
Geliang Tang
reviewercover Squash to "implement mptcp read_sock"
From: Geliang Tang <[email protected]>
Two small cleanups for "implement mptcp read_sock" v5.
Based-on: <[email protected]>
Geliang Tang (2):
Squash to "mptcp: implement .read_sock"
Squash to "mptcp: set .splice_read"
net/ipv4/tcp.c | 2 ++ net/mptcp/protocol.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.48.1
Geliang Tang
reviewerPATCH 1/2 Squash to "mptcp: implement .read_sock"
From: Geliang Tang <[email protected]>
No need to init copied to zero.
Signed-off-by Geliang Tang <[email protected]>
--- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/protocol.c +1 -1
@@ -3997,7 +3997,7 @@ static int mptcp_read_sock(struct sock *sk, read_descriptor_t *desc,struct scm_timestamping_internal tss;int flags =0 , cmsg_flags =0 ;size_t len = sk->sk_rcvbuf; -int copied =0 ; +int copied;if (sk->sk_state ==TCP_LISTEN )return -ENOTCONN ;
Signature · 1 line
2.48.1
Geliang Tang
reviewerPATCH 2/2 Squash to "mptcp: set .splice_read"
In reply to Geliang TangFrom: Geliang Tang <[email protected]>
Add NULL pointer checks.
Signed-off-by Geliang Tang <[email protected]>
--- net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+)
net/ipv4/tcp.c +2 -0
@@ -779,6 +779,8 @@ static int __tcp_splice_read(struct sock *sk, struct tcp_splice_state *tss) .count = tss->len, }; +if (unlikely (!ops || !ops->read_sock)) +return -ENOTSUPP ;return INDIRECT_CALL_INET_1 (ops->read_sock, tcp_read_sock, sk, &rd_desc, tcp_splice_data_recv); }
Signature · 1 line
2.48.1