Skip to contentSkip to conversation

tcp-lp: prevent chance for oops

PATCH Applied Wong Edison 2 participants 6 messages Sep 28, 2006 – Sep 30, 2006

Subsystems (4)
lore
Share & tools
lore

Wong Edison

author maintainer
#0 lore raw

PATCH 1/1 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.

---

net/ipv4/tcp_lp.c +1 -1
diff -urpN linux-2.6.18/net/ipv4/tcp_lp.c linux/net/ipv4/tcp_lp.c
@@ -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;
maintainer
#2 lore raw
In reply to Wong Edison

From: "Wong Edison" <[email protected]>
Date: Thu, 28 Sep 2006 18:43:58 +0800

Quoted 3 lines

*
- * 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 $

BTW, I'm deleting this line from the source file in the tree because every patch you send doesn't apply cleanly because your patch is against a different string on this line and we don't use $Id$ tags in the kernel sources anyways.

author maintainer
#3 lore raw

I do this since i have a sourceforge homepage for it. I update the CVS version there, test, and then submit to netdev. As I sync code in both side, this $Id$ is keeped.

May you just let it be? I think it will let my maintenance become more simple...

Quoted 12 lines · David Miller

From: "Wong Edison" <[email protected]>
Date: Thu, 28 Sep 2006 18:43:58 +0800

Quoted 3 lines

*
- * 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 $

BTW, I'm deleting this line from the source file in the tree because every patch you send doesn't apply cleanly because your patch is against a different string on this line and we don't use $Id$ tags in the kernel sources anyways.

maintainer
#4 lore raw

From: "Wong Edison" <[email protected]>
Date: Sat, 30 Sep 2006 03:27:00 +0800

Quoted 4 lines

I do this since i have a sourceforge homepage for it. I update the CVS version there, test, and then submit to netdev. As I sync code in both side, this $Id$ is keeped. May you just let it be? I think it will let my maintenance become more simple...

You could not even generate a clean patch to me, it just gets in the way and causes more work for me and anyone else who tries to use your patches.

If you want to use versioning, use MODULE_VERSION() just like everyone else in the kernel does.

author maintainer
#5 lore raw

oic i learn it and will change it in coming on version

Quoted 15 lines · David Miller

From: "Wong Edison" <[email protected]>
Date: Sat, 30 Sep 2006 03:27:00 +0800

Quoted 4 lines

I do this since i have a sourceforge homepage for it. I update the CVS version there, test, and then submit to netdev. As I sync code in both side, this $Id$ is keeped. May you just let it be? I think it will let my maintenance become more simple...

You could not even generate a clean patch to me, it just gets in the way and causes more work for me and anyone else who tries to use your patches.

If you want to use versioning, use MODULE_VERSION() just like everyone else in the kernel does.