aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/seclvl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/seclvl.c b/security/seclvl.c
index 1caac0164643..8529ea6f7aa8 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -368,8 +368,8 @@ static int seclvl_capable(struct task_struct *tsk, int cap)
368 */ 368 */
369static int seclvl_settime(struct timespec *tv, struct timezone *tz) 369static int seclvl_settime(struct timespec *tv, struct timezone *tz)
370{ 370{
371 struct timespec now; 371 if (tv && seclvl > 1) {
372 if (seclvl > 1) { 372 struct timespec now;
373 now = current_kernel_time(); 373 now = current_kernel_time();
374 if (tv->tv_sec < now.tv_sec || 374 if (tv->tv_sec < now.tv_sec ||
375 (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) { 375 (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) {