|
@@ -1242,7 +1242,7 @@ int do_settimeofday64(const struct timespec64 *ts)
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
|
|
- if (!timespec64_valid_strict(ts))
|
|
|
|
|
|
|
+ if (!timespec64_valid_settod(ts))
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
raw_spin_lock_irqsave(&timekeeper_lock, flags);
|
|
raw_spin_lock_irqsave(&timekeeper_lock, flags);
|
|
@@ -1299,7 +1299,7 @@ static int timekeeping_inject_offset(const struct timespec64 *ts)
|
|
|
/* Make sure the proposed value is valid */
|
|
/* Make sure the proposed value is valid */
|
|
|
tmp = timespec64_add(tk_xtime(tk), *ts);
|
|
tmp = timespec64_add(tk_xtime(tk), *ts);
|
|
|
if (timespec64_compare(&tk->wall_to_monotonic, ts) > 0 ||
|
|
if (timespec64_compare(&tk->wall_to_monotonic, ts) > 0 ||
|
|
|
- !timespec64_valid_strict(&tmp)) {
|
|
|
|
|
|
|
+ !timespec64_valid_settod(&tmp)) {
|
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
|
goto error;
|
|
goto error;
|
|
|
}
|
|
}
|
|
@@ -1556,7 +1556,7 @@ void __init timekeeping_init(void)
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
read_persistent_wall_and_boot_offset(&wall_time, &boot_offset);
|
|
read_persistent_wall_and_boot_offset(&wall_time, &boot_offset);
|
|
|
- if (timespec64_valid_strict(&wall_time) &&
|
|
|
|
|
|
|
+ if (timespec64_valid_settod(&wall_time) &&
|
|
|
timespec64_to_ns(&wall_time) > 0) {
|
|
timespec64_to_ns(&wall_time) > 0) {
|
|
|
persistent_clock_exists = true;
|
|
persistent_clock_exists = true;
|
|
|
} else if (timespec64_to_ns(&wall_time) != 0) {
|
|
} else if (timespec64_to_ns(&wall_time) != 0) {
|