]> granicus.if.org Git - spl/commitdiff
Prevent integer overflow after ~164 days of uptime.
authorRicardo M. Correia <Ricardo.M.Correia@Sun.COM>
Tue, 14 Jul 2009 22:23:25 +0000 (15:23 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jul 2009 22:23:25 +0000 (15:23 -0700)
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/spl/spl-time.c

index 1e9671e8394be3d8b34b217cf9cdd36f161c7fd7..2973ae82d58c4428d2d81d928dff908e73377072 100644 (file)
@@ -62,7 +62,7 @@ __gethrtime(void) {
 #else
         uint64_t j = get_jiffies_64();
 
-        return (hrtime_t)(j * NSEC_PER_SEC / HZ);
+        return (hrtime_t)(j * (NSEC_PER_SEC / HZ));
 #endif
 }
 EXPORT_SYMBOL(__gethrtime);