diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-06 10:03:29 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-06 10:03:29 +0100 |
commit | 70324494b6f283311c5339fb1795fdec2d8850d9 (patch) | |
tree | 5a318c2b60ba6e7861d630310d1930f62b8893ce /net/ipv4/tcp_illinois.c | |
parent | 73b5301b02c8d3456a5ea64c9ed9802a4a376af6 (diff) | |
parent | e47a682ace0cd56eb8e09b806c2b0f034b491520 (diff) |
Merge branch 'spi-linus' into spi-next
Diffstat (limited to 'net/ipv4/tcp_illinois.c')
-rw-r--r-- | net/ipv4/tcp_illinois.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 813b43a76fec..834857f3c871 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c @@ -313,11 +313,13 @@ static void tcp_illinois_info(struct sock *sk, u32 ext, .tcpv_rttcnt = ca->cnt_rtt, .tcpv_minrtt = ca->base_rtt, }; - u64 t = ca->sum_rtt; - do_div(t, ca->cnt_rtt); - info.tcpv_rtt = t; + if (info.tcpv_rttcnt > 0) { + u64 t = ca->sum_rtt; + do_div(t, info.tcpv_rttcnt); + info.tcpv_rtt = t; + } nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info); } } |