X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=security%2Fseclvl.c;h=8529ea6f7aa83437174727478988702d4e9db89b;hb=09779c6df2dbe95483269d194b327d41fe2cc57e;hp=1caac0164643c202a55c1e8394b9669706723591;hpb=4e0c1159d83a658d1ffba5bc3442f4ec4cadb436;p=linux-2.6-omap-h63xx.git diff --git a/security/seclvl.c b/security/seclvl.c index 1caac016464..8529ea6f7aa 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)) {