commit | 951069e311a2a931bf7c9d838db860f90bf14c45 | [log] [tgz] |
---|---|---|
author | Linus Torvalds <torvalds@g5.osdl.org> | Tue Jan 31 10:16:55 2006 -0800 |
committer | Linus Torvalds <torvalds@g5.osdl.org> | Tue Jan 31 10:16:55 2006 -0800 |
tree | 0aaeb29c496036983b4e894477f9d9f4881286e1 | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 [diff] [blame] |
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>
diff --git a/kernel/time.c b/kernel/time.c index 7477b1d..1f23e68 100644 --- a/kernel/time.c +++ b/kernel/time.c
@@ -155,7 +155,7 @@ static int firsttime = 1; int error = 0; - if (!timespec_valid(tv)) + if (tv && !timespec_valid(tv)) return -EINVAL; error = security_settime(tv, tz);