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

    tcp: Fix integer-overflow in TCP vegas

to the 3.16-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-fix-integer-overflow-in-tcp-vegas.patch
and it can be found in the queue-3.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From foo@baz Fri Aug  8 09:25:59 PDT 2014
From: Christoph Paasch <[email protected]>
Date: Tue, 29 Jul 2014 13:40:57 +0200
Subject: tcp: Fix integer-overflow in TCP vegas

From: Christoph Paasch <[email protected]>

[ Upstream commit 1f74e613ded11517db90b2bd57e9464d9e0fb161 ]

In vegas we do a multiplication of the cwnd and the rtt. This
may overflow and thus their result is stored in a u64. However, we first
need to cast the cwnd so that actually 64-bit arithmetic is done.

Then, we need to do do_div to allow this to be used on 32-bit arches.

Cc: Stephen Hemminger <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: David Laight <[email protected]>
Cc: Doug Leith <[email protected]>
Fixes: 8d3a564da34e (tcp: tcp_vegas cong avoid fix)
Signed-off-by: Christoph Paasch <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/ipv4/tcp_vegas.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -218,7 +218,8 @@ static void tcp_vegas_cong_avoid(struct
                         * This is:
                         *     (actual rate in segments) * baseRTT
                         */
-                       target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt;
+                       target_cwnd = (u64)tp->snd_cwnd * vegas->baseRTT;
+                       do_div(target_cwnd, rtt);
 
                        /* Calculate the difference between the window we had,
                         * and the window we would like to have. This quantity


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.16/tcp-fix-integer-overflow-in-tcp-vegas.patch
queue-3.16/tcp-fix-integer-overflows-in-tcp-veno.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to