From: "Wong Edison" <hswong3i@gmail.com>
To: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Stephen Hemminger" <shemminger@osdl.org>
Subject: [PATCH] tcp-lp: prevent chance for oops
Date: Thu, 28 Sep 2006 18:43:58 +0800 [thread overview]
Message-ID: <3feffd230609280343o1975ee70o8a55acf3e5d4769e@mail.gmail.com> (raw)
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>
---
diff -urpN linux-2.6.18/net/ipv4/tcp_lp.c linux/net/ipv4/tcp_lp.c
--- linux-2.6.18/net/ipv4/tcp_lp.c 2006-09-20 11:42:06.000000000 +0800
+++ linux/net/ipv4/tcp_lp.c 2006-09-28 18:30:17.000000000 +0800
@@ -32,7 +32,7 @@
* 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 $
+ * Version: $Id: tcp_lp.c,v 1.25 2006/09/22 20:50:27 hswong3i Exp $
*/
#include <linux/config.h>
@@ -165,7 +165,7 @@ static u32 tcp_lp_remote_hz_estimator(st
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;
next reply other threads:[~2006-09-28 10:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 10:43 Wong Edison [this message]
2006-09-28 21:38 ` [PATCH] tcp-lp: prevent chance for oops David Miller
2006-09-28 21:40 ` David Miller
2006-09-29 19:27 ` Wong Edison
2006-09-29 21:19 ` David Miller
2006-09-30 10:54 ` Wong Edison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3feffd230609280343o1975ee70o8a55acf3e5d4769e@mail.gmail.com \
--to=hswong3i@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox