@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.201 2019/10/05 12:57:40 kamil Exp $ */
+/* $NetBSD: kern_time.c,v 1.202 2020/01/01 17:28:17 thorpej 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.201 2019/10/05 12:57:40 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.202 2020/01/01 17:28:17 thorpej Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -136,23 +136,19 @@
settime1(struct proc *p, const struct timespec *ts, bool check_kauth)
{
struct timespec delta, now;
- int s;
/* WHAT DO WE DO ABOUT PENDING REAL-TIME TIMEOUTS??? */
- s = splclock();
nanotime(&now);
timespecsub(ts, &now, &delta);
if (check_kauth && kauth_authorize_system(kauth_cred_get(),
KAUTH_SYSTEM_TIME, KAUTH_REQ_SYSTEM_TIME_SYSTEM, __UNCONST(ts),
&delta, KAUTH_ARG(check_kauth ? false : true)) != 0) {
- splx(s);
return (EPERM);
}
#ifdef notyet
if ((delta.tv_sec < 86400) && securelevel > 0) { /* XXX elad - notyet */
- splx(s);
return (EPERM);
}
#endif
@@ -162,7 +158,6 @@
timespecadd(&boottime, &delta, &boottime);
resettodr();
- splx(s);
return (0);
}
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_todr.c,v 1.40 2019/07/07 15:12:59 maxv Exp $ */
+/* $NetBSD: kern_todr.c,v 1.41 2020/01/01 17:28:17 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -41,7 +41,7 @@
#include "opt_todr.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.40 2019/07/07 15:12:59 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.41 2020/01/01 17:28:17 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -81,7 +81,6 @@
bool waszero = (base == 0);
bool goodtime = false;
bool badrtc = false;
- int s;
struct timespec ts;
struct timeval tv;
@@ -169,9 +168,7 @@
ts.tv_sec = tv.tv_sec;
ts.tv_nsec = tv.tv_usec * 1000;
- s = splclock();
tc_setclock(&ts);
- splx(s);
if (waszero || goodtime)
return;