X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=security%2Fseclvl.c;h=8529ea6f7aa83437174727478988702d4e9db89b;hb=4885bf64bc2eb242ebebe67077cfe3688283b586;hp=1caac0164643c202a55c1e8394b9669706723591;hpb=536f8098026bde1368bbfcbcb9682a7637b73df2;p=powerpc.git diff --git a/security/seclvl.c b/security/seclvl.c index 1caac01646..8529ea6f7a 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)) {