diff options
Diffstat (limited to 'kernel/time.c')
-rw-r--r-- | kernel/time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/time.c b/kernel/time.c index bbc8ca194b59..c689b53297cf 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -154,6 +154,9 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz) | |||
154 | static int firsttime = 1; | 154 | static int firsttime = 1; |
155 | int error = 0; | 155 | int error = 0; |
156 | 156 | ||
157 | if (!timespec_valid(tv)) | ||
158 | return -EINVAL; | ||
159 | |||
157 | error = security_settime(tv, tz); | 160 | error = security_settime(tv, tz); |
158 | if (error) | 161 | if (error) |
159 | return error; | 162 | return error; |