tcp: avoid possible arithmetic overflows
authorEric Dumazet <edumazet@google.com>
Mon, 22 Sep 2014 20:19:44 +0000 (13:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 20:27:10 +0000 (16:27 -0400)
icsk_rto is a 32bit field, and icsk_backoff can reach 15 by default,
or more if some sysctl (eg tcp_retries2) are changed.

Better use 64bit to perform icsk_rto << icsk_backoff operations

As Joe Perches suggested, add a helper for this.

Yuchung spotted the tcp_v4_err() case.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found