public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "tcp: refresh skb timestamp at retransmit time" has been added to the 4.4-stable tree
@ 2016-05-16 18:26 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-16 18:26 UTC (permalink / raw)
  To: edumazet, davem, gregkh, ycheng; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    tcp: refresh skb timestamp at retransmit time

to the 4.4-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-refresh-skb-timestamp-at-retransmit-time.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon May 16 11:21:32 PDT 2016
From: Eric Dumazet <edumazet@google.com>
Date: Mon, 9 May 2016 20:55:16 -0700
Subject: tcp: refresh skb timestamp at retransmit time

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit 10a81980fc47e64ffac26a073139813d3f697b64 ]

In the very unlikely case __tcp_retransmit_skb() can not use the cloning
done in tcp_transmit_skb(), we need to refresh skb_mstamp before doing
the copy and transmit, otherwise TCP TS val will be an exact copy of
original transmit.

Fixes: 7faee5c0d514 ("tcp: remove TCP_SKB_CB(skb)->when")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/tcp_output.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2625,8 +2625,10 @@ int __tcp_retransmit_skb(struct sock *sk
 	 */
 	if (unlikely((NET_IP_ALIGN && ((unsigned long)skb->data & 3)) ||
 		     skb_headroom(skb) >= 0xFFFF)) {
-		struct sk_buff *nskb = __pskb_copy(skb, MAX_TCP_HEADER,
-						   GFP_ATOMIC);
+		struct sk_buff *nskb;
+
+		skb_mstamp_get(&skb->skb_mstamp);
+		nskb = __pskb_copy(skb, MAX_TCP_HEADER, GFP_ATOMIC);
 		err = nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) :
 			     -ENOBUFS;
 	} else {


Patches currently in stable-queue which might be from edumazet@google.com are

queue-4.4/tcp-refresh-skb-timestamp-at-retransmit-time.patch
queue-4.4/netem-segment-gso-packets-on-enqueue.patch
queue-4.4/net-mlx4_en-fix-spurious-timestamping-callbacks.patch
queue-4.4/net-sched-do-not-requeue-a-null-skb.patch
queue-4.4/soreuseport-fix-ordering-for-mixed-v4-v6-sockets.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-16 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 18:26 Patch "tcp: refresh skb timestamp at retransmit time" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox