From: Yu Liao liaoyu15@huawei.com
hulk inclusion category: bugfix bugzilla: 185900, https://gitee.com/openeuler/kernel/issues/I4MOGB CVE: NA
-----------------------------------------------
This reverts commit 2a3c581973756b8f08df4749de848d86bd46665d. Commit c0b527413194 fixes undefined behaviour in timespec64_to_ns(), 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/posix-timers.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index aebb612404006..12c4048c54239 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -877,14 +877,6 @@ static int do_timer_settime(timer_t timer_id, int flags, if (!timespec64_valid(&new_spec64->it_interval) || !timespec64_valid(&new_spec64->it_value)) return -EINVAL; - if (new_spec64->it_interval.tv_sec >= KTIME_SEC_MAX) { - new_spec64->it_interval.tv_sec = KTIME_SEC_MAX; - new_spec64->it_interval.tv_nsec = 0; - } - if (new_spec64->it_value.tv_sec >= KTIME_SEC_MAX) { - new_spec64->it_value.tv_sec = KTIME_SEC_MAX; - new_spec64->it_value.tv_nsec = 0; - }
if (old_spec64) memset(old_spec64, 0, sizeof(*old_spec64));