Skip to contentSkip to conversation

fix check_tsc_warp bug

PATCH New Dan Magenheimer 1 participant 1 message Oct 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix check_tsc_warp bug

I wasn't able to easily test the check_tsc_warp patch on a machine which did have skew, so I synthesized skew and discovered this bug.

xen/arch/x86/time.c +1 -1
diff -r f9cbb5a274d6 xen/arch/x86/time.c
@@ -1494,7 +1494,7 @@ void check_tsc_warp(unsigned long tsc_kh
         if ( unlikely(prev > now) )
         {
             spin_lock(&sync_lock);
-            if ( *max_warp > prev - now )
+            if ( *max_warp < prev - now )
                 *max_warp = prev - now;
             spin_unlock(&sync_lock);
         }