diff options
author | Wong Hoi Sing Edison <hswong3i@gmail.com> | 2006-09-28 14:40:21 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 18:03:07 -0700 |
commit | bfbea8a8869a0e21b97605841d04190d63665d19 (patch) | |
tree | c447c1787942fcc9d2b4c6b7404ca75104984c70 /net | |
parent | 1811474620d1986da45f7245168bf7c2d883d770 (diff) |
[TCP] tcp-lp: prevent chance for oops
This patch fix the chance for tcp_lp_remote_hz_estimator return 0, if
0 < rhz < 64. It also make sure the flag LP_VALID_RHZ is set
correctly.
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_lp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index 308fb7e071c5..f0ebaf0e21cb 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c @@ -31,8 +31,6 @@ * Hung Hing Lun, Mike <hlhung3i@gmail.com> * SourceForge project page: * http://tcp-lp-mod.sourceforge.net/ - * - * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $ */ #include <linux/module.h> @@ -164,7 +162,7 @@ static u32 tcp_lp_remote_hz_estimator(struct sock *sk) out: /* record time for successful remote HZ calc */ - if (rhz > 0) + if ((rhz >> 6) > 0) lp->flag |= LP_VALID_RHZ; else lp->flag &= ~LP_VALID_RHZ; |