aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-12-06 01:49:37 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-06 01:56:07 -0500
commita2acde07711f7d8b19928245c555bce60f91482a (patch)
tree8632a450cff2f211f7c5a9f1a494aed47081fae7 /net/ipv4
parentd5dd9175bc12015ea4d2c1a9b6b15dfa645a3db9 (diff)
tcp: fix tso_should_defer in 64bit
Since jiffies is unsigned long, the types get expanded into that and after long enough time the difference will therefore always be > 1 (and that probably happens near boot as well as iirc the first jiffies wrap is scheduler close after boot to find out problems related to that early). This was originally noted by Bill Fink in Dec'07 but nobody never ended fixing it. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index e65c114feea2..dda42f0bd7a3 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1334,7 +1334,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
1334 1334
1335 /* Defer for less than two clock ticks. */ 1335 /* Defer for less than two clock ticks. */
1336 if (tp->tso_deferred && 1336 if (tp->tso_deferred &&
1337 ((jiffies << 1) >> 1) - (tp->tso_deferred >> 1) > 1) 1337 (((u32)jiffies << 1) >> 1) - (tp->tso_deferred >> 1) > 1)
1338 goto send_now; 1338 goto send_now;
1339 1339
1340 in_flight = tcp_packets_in_flight(tp); 1340 in_flight = tcp_packets_in_flight(tp);