projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f82b2b
)
[PATCH] hrtimer: validate timespec of do_sys_settimeofday
author
Thomas Gleixner
<tglx@linutronix.de>
Tue, 10 Jan 2006 04:52:29 +0000
(20:52 -0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:01:37 +0000
(08:01 -0800)
Check if the timespec which is provided from user space is normalized.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/time.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/time.c
b/kernel/time.c
index bbc8ca194b59ee3687a1ec4ced54a94e4cadbbde..c689b53297cfb0dc3c1b36d04240cebad8766d87 100644
(file)
--- a/
kernel/time.c
+++ b/
kernel/time.c
@@
-154,6
+154,9
@@
int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
static int firsttime = 1;
int error = 0;
+ if (!timespec_valid(tv))
+ return -EINVAL;
+
error = security_settime(tv, tz);
if (error)
return error;