summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:38:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:38:48 -0700
commit8cde1ad6683f8738ad71f788dca8ab4810cf5afe (patch)
tree13801d1669efd13e85884609e0a18f3e74b2ede0 /kernel
parent6bb7a935489dab20802dde6c2cb7d8582f4849bf (diff)
parent5b16a2212f1840b63d6cc476b26ff9349dab185e (diff)
downloadkernel-crypto-8cde1ad6683f8738ad71f788dca8ab4810cf5afe.tar.gz
kernel-crypto-8cde1ad6683f8738ad71f788dca8ab4810cf5afe.tar.xz
kernel-crypto-8cde1ad6683f8738ad71f788dca8ab4810cf5afe.zip
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched_clock: prevent scd->clock from moving backwards
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_clock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index e8ab096ddfe..81787248b60 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
/*
* scd->clock = clamp(scd->tick_gtod + delta,
- * max(scd->tick_gtod, scd->clock),
- * scd->tick_gtod + TICK_NSEC);
+ * max(scd->tick_gtod, scd->clock),
+ * max(scd->clock, scd->tick_gtod + TICK_NSEC));
*/
clock = scd->tick_gtod + delta;
min_clock = wrap_max(scd->tick_gtod, scd->clock);
- max_clock = scd->tick_gtod + TICK_NSEC;
+ max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC);
clock = wrap_max(clock, min_clock);
clock = wrap_min(clock, max_clock);