diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-31 19:16:55 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-31 19:16:55 +0100 |
commit | 951069e311a2a931bf7c9d838db860f90bf14c45 (patch) | |
tree | 0aaeb29c496036983b4e894477f9d9f4881286e1 /security/seclvl.c | |
parent | [SPARC64]: Use compat_sys_futimesat in 32-bit syscall table. (diff) | |
download | linux-951069e311a2a931bf7c9d838db860f90bf14c45.tar.xz linux-951069e311a2a931bf7c9d838db860f90bf14c45.zip |
Don't try to "validate" a non-existing timeval.
settime() with a NULL timeval is silly but legal.
Noticed by Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/seclvl.c')
-rw-r--r-- | security/seclvl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/seclvl.c b/security/seclvl.c index 1caac0164643..8529ea6f7aa8 100644 --- a/security/seclvl.c +++ b/security/seclvl.c @@ -368,8 +368,8 @@ static int seclvl_capable(struct task_struct *tsk, int cap) */ static int seclvl_settime(struct timespec *tv, struct timezone *tz) { - struct timespec now; - if (seclvl > 1) { + if (tv && seclvl > 1) { + struct timespec now; now = current_kernel_time(); if (tv->tv_sec < now.tv_sec || (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) { |