提交 23a874d0 编写于 作者: Y Yu Liao 提交者: Yang Yingliang

Revert "timekeeping: Fix ktime_add overflow in tk_set_wall_to_mono"

hulk inclusion
category: bugfix
bugzilla: 185900, https://gitee.com/openeuler/kernel/issues/I4MOGB
CVE: NA

-------------------------------------------------

This reverts commit 56ef5ae6.
Commit 7a8e61f8 force upper bound for setting CLOCK_REALTIME.
The realtime is limited, so just revert it.
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 9ef95d83
...@@ -144,8 +144,7 @@ static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec64 wtm) ...@@ -144,8 +144,7 @@ static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec64 wtm)
tk->wall_to_monotonic = wtm; tk->wall_to_monotonic = wtm;
set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec); set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec);
tk->offs_real = timespec64_to_ktime(tmp); tk->offs_real = timespec64_to_ktime(tmp);
tk->offs_tai = ktime_add_safe(tk->offs_real, tk->offs_tai = ktime_add(tk->offs_real, ktime_set(tk->tai_offset, 0));
ktime_set(tk->tai_offset, 0));
} }
static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta) static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册