projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge remote-tracking branch 'asoc/fix/wm8731' into asoc-linus
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
time
/
time.c
diff --git
a/kernel/time/time.c
b/kernel/time/time.c
index 6390517e77d48abb83c0d0ffec27864b4695c4c4..2c85b7724af4b0081a112e1b12cbcce4ef831117 100644
(file)
--- a/
kernel/time/time.c
+++ b/
kernel/time/time.c
@@
-196,6
+196,10
@@
SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
if (tv) {
if (copy_from_user(&user_tv, tv, sizeof(*tv)))
return -EFAULT;
+
+ if (!timeval_valid(&user_tv))
+ return -EINVAL;
+
new_ts.tv_sec = user_tv.tv_sec;
new_ts.tv_nsec = user_tv.tv_usec * NSEC_PER_USEC;
}