HomeFreeBSD

Verify that tv_sec value specified in settimeofday() and clock_settime()

Description

Verify that tv_sec value specified in settimeofday() and clock_settime()
(CLOCK_REALTIME case) system calls is non negative.
This commit hides a kernel panic in atrtc_settime() as the clock_ts_to_ct()
does not properly convert negative tv_sec.

ps. in my opinion clock_ts_to_ct() should be rewritten to properly handle
negative tv_sec values.

Differential Revision: https://reviews.freebsd.org/D4714
Reviewed by: kib

MFC after: 1 week

Details

Provenance
dchaginAuthored on
Reviewer
kib
Differential Revision
D4714: settimeofday system call panic.
Parents
rS292776: MFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.
Branches
Unknown
Tags
Unknown