Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by maxv...
details: https://anonhg.NetBSD.org/src/rev/ef16151c7f15
branches: netbsd-9
changeset: 933021:ef16151c7f15
user: martin <martin%NetBSD.org@localhost>
date: Mon May 18 19:05:32 2020 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #916):
sys/kern/kern_time.c: revision 1.204
Fix uninitialized memory access. Found by KMSAN.
diffstat:
sys/kern/kern_time.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 78a5b4a23f24 -r ef16151c7f15 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c Mon May 18 18:59:39 2020 +0000
+++ b/sys/kern/kern_time.c Mon May 18 19:05:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.197.4.2 2019/09/11 16:36:13 martin Exp $ */
+/* $NetBSD: kern_time.c,v 1.197.4.3 2020/05/18 19:05:32 martin Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.197.4.2 2019/09/11 16:36:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.197.4.3 2020/05/18 19:05:32 martin Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -356,8 +356,12 @@
struct timespec rmtend;
struct timespec t0;
struct timespec *t;
+ int err;
- (void)clock_gettime1(clock_id, &rmtend);
+ err = clock_gettime1(clock_id, &rmtend);
+ if (err != 0)
+ return err;
+
t = (rmt != NULL) ? rmt : &t0;
if (flags & TIMER_ABSTIME) {
timespecsub(rqt, &rmtend, t);
Home |
Main Index |
Thread Index |
Old Index