提交 9ef95d83 编写于 作者: Y Yu Liao 提交者: Yang Yingliang

Revert "timekeeping: Avoid undefined behaviour in 'ktime_get_with_offset()'"

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

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

This reverts commit 85d6dbdf.
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>
上级 1272eeed
...@@ -798,7 +798,7 @@ ktime_t ktime_get_with_offset(enum tk_offsets offs) ...@@ -798,7 +798,7 @@ ktime_t ktime_get_with_offset(enum tk_offsets offs)
do { do {
seq = read_seqcount_begin(&tk_core.seq); seq = read_seqcount_begin(&tk_core.seq);
base = ktime_add_safe(tk->tkr_mono.base, *offset); base = ktime_add(tk->tkr_mono.base, *offset);
nsecs = timekeeping_get_ns(&tk->tkr_mono); nsecs = timekeeping_get_ns(&tk->tkr_mono);
} while (read_seqcount_retry(&tk_core.seq, seq)); } while (read_seqcount_retry(&tk_core.seq, seq));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册