Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-1]: src/sys/kern Pull up following revision(s) (requested by ml...



details:   https://anonhg.NetBSD.org/src/rev/8cd43ea9f466
branches:  netbsd-7-1
changeset: 800969:8cd43ea9f466
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Feb 24 10:54:36 2019 +0000

description:
Pull up following revision(s) (requested by mlelstv in ticket #1196):

        sys/kern/kern_time.c: revision 1.196

The callout is used by any nonvirtual timer including CLOCK_MONOTONIC
and needs to be initialized.

Detected by [syzkaller].

diffstat:

 sys/kern/kern_time.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 176ccfa93c4a -r 8cd43ea9f466 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Sat Feb 23 07:17:03 2019 +0000
+++ b/sys/kern/kern_time.c      Sun Feb 24 10:54:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.179.8.1.4.4 2019/02/01 11:08:56 martin Exp $   */
+/*     $NetBSD: kern_time.c,v 1.179.8.1.4.5 2019/02/24 10:54:36 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.179.8.1.4.4 2019/02/01 11:08:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.1.4.5 2019/02/24 10:54:36 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/resourcevar.h>
@@ -1141,7 +1141,7 @@
                pt->pt_type = which;
                pt->pt_entry = which;
                pt->pt_queued = false;
-               if (pt->pt_type == CLOCK_REALTIME)
+               if (!CLOCK_VIRTUAL_P(which))
                        callout_init(&pt->pt_ch, CALLOUT_MPSAFE);
                else
                        pt->pt_active = 0;



Home | Main Index | Thread Index | Old Index