
From: Yu Liao <liaoyu15@huawei.com> hulk inclusion category: bugfix bugzilla: 185900, https://gitee.com/openeuler/kernel/issues/I4MOGB CVE: NA ------------------------------------------------- This reverts commit 56ef5ae6322ae29833a610bb5c75dcab1f50b133. Commit 7a8e61f84786 force upper bound for setting CLOCK_REALTIME. The realtime is limited, so just revert it. Signed-off-by: Yu Liao <liaoyu15@huawei.com> Reviewed-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- kernel/time/timekeeping.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 5a91ac540a47e..f246818e35dbc 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -144,8 +144,7 @@ static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec64 wtm) tk->wall_to_monotonic = wtm; set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec); tk->offs_real = timespec64_to_ktime(tmp); - tk->offs_tai = ktime_add_safe(tk->offs_real, - ktime_set(tk->tai_offset, 0)); + tk->offs_tai = ktime_add(tk->offs_real, ktime_set(tk->tai_offset, 0)); } static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta) -- 2.25.1