Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 Apply fix from natuve clock_nanosleep(2)...



details:   https://anonhg.NetBSD.org/src/rev/00288d8f8d04
branches:  trunk
changeset: 822015:00288d8f8d04
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sun Feb 26 10:26:19 2017 +0000

description:
Apply fix from natuve clock_nanosleep(2) to not copyout remaining time
struct if TIMER_ABSTIME flag is set.

diffstat:

 sys/compat/netbsd32/netbsd32_time.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7e54edae5502 -r 00288d8f8d04 sys/compat/netbsd32/netbsd32_time.c
--- a/sys/compat/netbsd32/netbsd32_time.c       Sun Feb 26 09:49:40 2017 +0000
+++ b/sys/compat/netbsd32/netbsd32_time.c       Sun Feb 26 10:26:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $ */
+/*     $NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -453,7 +453,8 @@
                goto out;
 
        netbsd32_from_timespec(&rmt, &ts32);
-       if ((error1 = copyout(&ts32, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0)
+       if ((SCARG(uap, flags) & TIMER_ABSTIME) == 0 &&
+           (error1 = copyout(&ts32, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0)
                error = error1;
 out:
        *retval = error;



Home | Main Index | Thread Index | Old Index