kpatch/test/integration/ubuntu-16.04/gcc-constprop.patch
Joe Lawrence b6692c14d7 testing: add and rebase integration tests for Ubuntu 16
Kernel version: 4.4.0-53-generic
2016-12-16 16:06:49 -05:00

17 lines
525 B
Diff

ensure timekeeping_forward_now.constprop.8 and
timekeeping_forward_now.constprop.9 are correlated.
diff -Nupr src.orig/kernel/time/timekeeping.c src/kernel/time/timekeeping.c
--- src.orig/kernel/time/timekeeping.c 2016-12-15 19:56:00.136000000 +0000
+++ src/kernel/time/timekeeping.c 2016-12-15 19:56:30.496000000 +0000
@@ -1148,6 +1148,9 @@ void do_gettimeofday(struct timeval *tv)
{
struct timespec64 now;
+ if (!tv)
+ return;
+
getnstimeofday64(&now);
tv->tv_sec = now.tv_sec;
tv->tv_usec = now.tv_nsec/1000;