mirror of https://github.com/dynup/kpatch
14 lines
425 B
Diff
14 lines
425 B
Diff
diff -Nupr src.orig/kernel/time/timekeeping.c src/kernel/time/timekeeping.c
|
|
--- src.orig/kernel/time/timekeeping.c 2020-05-12 11:14:29.670773651 -0400
|
|
+++ src/kernel/time/timekeeping.c 2020-05-12 11:15:41.897643417 -0400
|
|
@@ -1221,6 +1221,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;
|