Author: kib
Date: Fri Aug 26 10:06:24 2016
New Revision: 304844
URL: https://svnweb.freebsd.org/changeset/base/304844

Log:
  MFC r303388:
  Remove Giant from settime().

Modified:
  stable/11/sys/kern/kern_time.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_time.c
==============================================================================
--- stable/11/sys/kern/kern_time.c      Fri Aug 26 10:04:10 2016        
(r304843)
+++ stable/11/sys/kern/kern_time.c      Fri Aug 26 10:06:24 2016        
(r304844)
@@ -120,9 +120,7 @@ settime(struct thread *td, struct timeva
        struct timeval delta, tv1, tv2;
        static struct timeval maxtime, laststep;
        struct timespec ts;
-       int s;
 
-       s = splclock();
        microtime(&tv1);
        delta = *tv;
        timevalsub(&delta, &tv1);
@@ -152,10 +150,8 @@ settime(struct thread *td, struct timeva
                                printf("Time adjustment clamped to -1 
second\n");
                        }
                } else {
-                       if (tv1.tv_sec == laststep.tv_sec) {
-                               splx(s);
+                       if (tv1.tv_sec == laststep.tv_sec)
                                return (EPERM);
-                       }
                        if (delta.tv_sec > 1) {
                                tv->tv_sec = tv1.tv_sec + 1;
                                printf("Time adjustment clamped to +1 
second\n");
@@ -166,10 +162,8 @@ settime(struct thread *td, struct timeva
 
        ts.tv_sec = tv->tv_sec;
        ts.tv_nsec = tv->tv_usec * 1000;
-       mtx_lock(&Giant);
        tc_setclock(&ts);
        resettodr();
-       mtx_unlock(&Giant);
        return (0);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to