mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] hrtimer: validate timespec of do_sys_settimeofday
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>
This commit is contained in:
parent
5f82b2b77e
commit
718bcceb5a
1 changed files with 3 additions and 0 deletions
|
@ -154,6 +154,9 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
|
||||||
static int firsttime = 1;
|
static int firsttime = 1;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
if (!timespec_valid(tv))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
error = security_settime(tv, tz);
|
error = security_settime(tv, tz);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
Loading…
Reference in a new issue