diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-31 10:16:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-31 10:16:55 -0800 |
commit | 951069e311a2a931bf7c9d838db860f90bf14c45 (patch) | |
tree | 0aaeb29c496036983b4e894477f9d9f4881286e1 /kernel/time.c | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) | |
download | kernel-common-951069e311a2a931bf7c9d838db860f90bf14c45.tar.gz kernel-common-951069e311a2a931bf7c9d838db860f90bf14c45.tar.bz2 kernel-common-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 'kernel/time.c')
-rw-r--r-- | kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time.c b/kernel/time.c index 7477b1d2079e..1f23e683d6aa 100644 --- a/kernel/time.c +++ b/kernel/time.c @@ -155,7 +155,7 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz) static int firsttime = 1; int error = 0; - if (!timespec_valid(tv)) + if (tv && !timespec_valid(tv)) return -EINVAL; error = security_settime(tv, tz); |