From c8a13cf21394a3e376e1fb3a6a073b39485d0834 Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Wed, 16 Sep 2015 11:23:45 +0900 Subject: [PATCH] make gettimeofday ignore NULL parameter --- kernel/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/syscall.c b/kernel/syscall.c index d824b25c..8ab21834 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -4978,6 +4978,11 @@ SYSCALL_DECLARE(gettimeofday) struct syscall_request request IHK_DMA_ALIGN; struct timezone *tz = (struct timezone *)ihk_mc_syscall_arg1(ctx); + if (!tv && !tz) { + /* nothing to do */ + return 0; + } + /* Do it locally if supported */ if (!tz && gettime_local_support) { update_cpu_local_time();