Title: [8500] trunk/kernel/time/timekeeping.c: Fix bug[#5960] Avoid deal loop by keep shift positive.
Revision
8500
Author
sonicz
Date
2010-03-18 05:14:59 -0400 (Thu, 18 Mar 2010)

Log Message

Fix bug[#5960] Avoid deal loop by keep shift positive.

This patch is from John Stultz <[email protected]>

Modified Paths

Diff

Modified: trunk/kernel/time/timekeeping.c (8499 => 8500)


--- trunk/kernel/time/timekeeping.c	2010-03-18 09:01:29 UTC (rev 8499)
+++ trunk/kernel/time/timekeeping.c	2010-03-18 09:14:59 UTC (rev 8500)
@@ -817,7 +817,8 @@
 	shift = min(shift, maxshift);
 	while (offset >= timekeeper.cycle_interval) {
 		offset = logarithmic_accumulation(offset, shift);
-		shift--;
+		if (offset < timekeeper.cycle_interval<<shift)
+			shift--;
 	}
 
 	/* correct the clock when NTP error is too big */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to