Patch "tcp: restore fastopen with no data in SYN packet" has been added to the 4.3-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
tcp: restore fastopen with no data in SYN packet
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tcp-restore-fastopen-with-no-data-in-syn-packet.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 30 19:48:47 PST 2015
From: Eric Dumazet <[email protected]>
Date: Wed, 16 Dec 2015 13:53:10 -0800
Subject: tcp: restore fastopen with no data in SYN packet
From: Eric Dumazet <[email protected]>
[ Upstream commit 07e100f984975cb0417a7d5e626d0409efbad478 ]
Yuchung tracked a regression caused by commit 57be5bdad759 ("ip: convert tcp_sendmsg() to iov_iter primitives") for TCP Fast Open.
Some Fast Open users do not actually add any data in the SYN packet.
--- net/ipv4/tcp_output.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
net/ipv4/tcp_output.c +12 -11
@@ -3147,7 +3147,7 @@ static int tcp_send_syn_data(struct sock {struct tcp_sock *tp =tcp_sk (sk);struct tcp_fastopen_request *fo = tp->fastopen_req; -int syn_loss =0 , space, err =0 , copied; +int syn_loss =0 , space, err =0 ;unsigned long last_syn_loss =0 ;struct sk_buff *syn_data;
@@ -3185,17 +3185,18 @@ static int tcp_send_syn_data(struct sock goto fallback; syn_data->ip_summed =CHECKSUM_PARTIAL ;memcpy (syn_data->cb, syn->cb,sizeof (syn->cb)); - copied =copy_from_iter (skb_put (syn_data, space), space, - &fo->data->msg_iter); -if (unlikely (!copied)) { -kfree_skb (syn_data); - goto fallback; - } -if (copied != space) { -skb_trim (syn_data, copied); - space = copied; +if (space) { +int copied =copy_from_iter (skb_put (syn_data, space), space, + &fo->data->msg_iter); +if (unlikely (!copied)) { +kfree_skb (syn_data); + goto fallback; + } +if (copied != space) { +skb_trim (syn_data, copied); + space = copied; + } } -/* No more data pending in inet_wait_for_connect() */ if (space == fo->size) fo->data =NULL ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/inet-tcp-fix-inetpeer_set_addr_v4.patch queue-4.3/ipv6-sctp-clone-options-to-avoid-use-after-free.patch queue-4.3/tcp-restore-fastopen-with-no-data-in-syn-packet.patch queue-4.3/net_sched-make-qdisc_tree_decrease_qlen-work-for-non-mq.patch queue-4.3/net-fix-ip-early-demux-races.patch