rpms/kernel/F-12 tcp-fix-icmp-rto-war.patch, NONE, 1.1 kernel.spec, 1.2025, 1.2026

Chuck Ebbert cebbert at fedoraproject.org
Thu Feb 25 09:59:26 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28610

Modified Files:
	kernel.spec 
Added Files:
	tcp-fix-icmp-rto-war.patch 
Log Message:
TCP: fix broken RTO calculation causing high CPU load (#567530)

tcp-fix-icmp-rto-war.patch:
 tcp_input.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- NEW FILE tcp-fix-icmp-rto-war.patch ---
From: Damian Lukowski <damian at tvk.rwth-aachen.de>
Date: Thu, 11 Feb 2010 02:04:08 +0000 (-0800)
Subject: tcp: fix ICMP-RTO war
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=598856407d4e20ebb4de01a91a93d89325924d43

tcp: fix ICMP-RTO war

#567530
[ bug introduced in 2.6.32-rc1 ]

Make sure, that TCP has a nonzero RTT estimation after three-way
handshake. Currently, a listening TCP has a value of 0 for srtt,
rttvar and rto right after the three-way handshake is completed
with TCP timestamps disabled.
This will lead to corrupt RTO recalculation and retransmission
flood when RTO is recalculated on backoff reversion as introduced
in "Revert RTO on ICMP destination unreachable"
(f1ecd5d9e7366609d640ff4040304ea197fbc618).
This behaviour can be provoked by connecting to a server which
"responds first" (like SMTP) and rejecting every packet after
the handshake with dest-unreachable, which will lead to softirq
load on the server (up to 30% per socket in some tests).

Thanks to Ilpo Jarvinen for providing debug patches and to
Denys Fedoryshchenko for reporting and testing.

Changes since v3: Removed bad characters in patchfile.

Reported-by: Denys Fedoryshchenko <denys at visp.net.lb>
Signed-off-by: Damian Lukowski <damian at tvk.rwth-aachen.de>
Signed-off-by: David S. Miller <davem at davemloft.net>
---

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 28e0296..3fddc69 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
 
 				/* tcp_ack considers this ACK as duplicate
 				 * and does not calculate rtt.
-				 * Fix it at least with timestamps.
+				 * Force it here.
 				 */
-				if (tp->rx_opt.saw_tstamp &&
-				    tp->rx_opt.rcv_tsecr && !tp->srtt)
-					tcp_ack_saw_tstamp(sk, 0);
+				tcp_ack_update_rtt(sk, 0, 0);
 
 				if (tp->rx_opt.tstamp_ok)
 					tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.2025
retrieving revision 1.2026
diff -u -p -r1.2025 -r1.2026
--- kernel.spec	25 Feb 2010 06:01:59 -0000	1.2025
+++ kernel.spec	25 Feb 2010 09:59:25 -0000	1.2026
@@ -763,6 +763,9 @@ Patch12320: linux-2.6-net-r8169-improved
 # rhbz#/566565
 Patch12340: ice1712-fix-revo71-mixer-names.patch
 
+# rhbz#567530
+Patch12350: tcp-fix-icmp-rto-war.patch
+
 # ==============================================================================
 
 %endif
@@ -1402,6 +1405,9 @@ ApplyPatch linux-2.6-net-r8169-improved-
 # rhbz#566565
 ApplyPatch ice1712-fix-revo71-mixer-names.patch
 
+# rhbz#567530
+ApplyPatch tcp-fix-icmp-rto-war.patch
+
 # END OF PATCH APPLICATIONS ====================================================
 
 %endif
@@ -2057,6 +2063,9 @@ fi
 # and build.
 
 %changelog
+* Thu Feb 25 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.32.9-66
+- TCP: fix broken RTO calculation causing high CPU load (#567530)
+
 * Thu Feb 25 2010 Ben Skeggs <bskeggs at redhat.com> 2.6.32.9-65
 - nouveau: DP fix for cards with version 0x20 DP tables
 



More information about the scm-commits mailing list