From 6eef6ea5bf6794c2d0938ba1c91934229ad9873e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 31 Jan 2006 21:20:26 -0800 Subject: [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 Signed-off-by: Linus Torvalds [chrisw: seclvl only] Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- security/seclvl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- cgit v1.2.3