File: gcc-constprop.patch.disabled

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (14 lines) | stat: -rw-r--r-- 365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 4786df9..c73a687 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1211,6 +1211,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;