X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=security%2Fseclvl.c;h=8529ea6f7aa83437174727478988702d4e9db89b;hb=bd84b0cc99d267d6512f01a55af7dbb673f784af;hp=1caac0164643c202a55c1e8394b9669706723591;hpb=c1d9728ecc5b560465df3c0c0d3b3825c2710b40;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)) {