time: Avoid undefined behaviour in ktime_add_safe()
[cascardo/linux.git] / kernel / time / hrtimer.c
index 252ea47..bb5ec42 100644 (file)
@@ -307,7 +307,7 @@ EXPORT_SYMBOL_GPL(__ktime_divns);
  */
 ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs)
 {
-       ktime_t res = ktime_add(lhs, rhs);
+       ktime_t res = ktime_add_unsafe(lhs, rhs);
 
        /*
         * We use KTIME_SEC_MAX here, the maximum timeout which we can