summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)) {