aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-01-31 21:20:26 -0800
committerChris Wright <chrisw@sous-sol.org>2006-02-09 23:20:06 -0800
commit6eef6ea5bf6794c2d0938ba1c91934229ad9873e (patch)
treed4d63df01b883d1fd717d2ec1bee75df041145eb
parente8ef6e326e777417a4287e114751e89444d99082 (diff)
downloadlinux-linaro-stable-6eef6ea5bf6794c2d0938ba1c91934229ad9873e.tar.gz
[PATCH] seclvl settime fix
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> [chrisw: seclvl only] Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--security/seclvl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/seclvl.c b/security/seclvl.c
index 1caac0164643..136e8eca3618 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -369,7 +369,7 @@ 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) {
now = current_kernel_time();
if (tv->tv_sec < now.tv_sec ||
(tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) {