]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.20.2/fix-tcp-fin-handling.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.2 / fix-tcp-fin-handling.patch
1 From stable-bounces@linux.kernel.org Tue Feb 6 21:58:49 2007
2 From: John Heffner <jheffner@psc.edu>
3 Date: Tue, 06 Feb 2007 21:57:34 -0800 (PST)
4 Subject: Fix TCP FIN handling
5 To: stable@kernel.org
6 Cc: bunk@stusta.de
7 Message-ID: <20070206.215734.83621142.davem@davemloft.net>
8
9 From: John Heffner <jheffner@psc.edu>
10
11 We can accidently spit out a huge burst of packets with TSO
12 when the FIN back is piggybacked onto the final packet.
13
14 [TCP]: Don't apply FIN exception to full TSO segments.
15
16 Signed-off-by: John Heffner <jheffner@psc.edu>
17 Signed-off-by: David S. Miller <davem@davemloft.net>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 net/ipv4/tcp_output.c | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24 --- linux-2.6.20.1.orig/net/ipv4/tcp_output.c
25 +++ linux-2.6.20.1/net/ipv4/tcp_output.c
26 @@ -965,7 +965,8 @@ static inline unsigned int tcp_cwnd_test
27 u32 in_flight, cwnd;
28
29 /* Don't be strict about the congestion window for the final FIN. */
30 - if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)
31 + if ((TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) &&
32 + tcp_skb_pcount(skb) == 1)
33 return 1;
34
35 in_flight = tcp_packets_in_flight(tp);