Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/kern/lib/libsysproxy rump: add missing sanity check...



details:   https://anonhg.NetBSD.org/src/rev/39d5dc1a9535
branches:  trunk
changeset: 455925:39d5dc1a9535
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Apr 18 08:31:44 2019 +0000

description:
rump: add missing sanity checks at the end of syscalls

diffstat:

 sys/rump/kern/lib/libsysproxy/sysproxy.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r c37c9c9d2d11 -r 39d5dc1a9535 sys/rump/kern/lib/libsysproxy/sysproxy.c
--- a/sys/rump/kern/lib/libsysproxy/sysproxy.c  Thu Apr 18 07:56:54 2019 +0000
+++ b/sys/rump/kern/lib/libsysproxy/sysproxy.c  Thu Apr 18 08:31:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysproxy.c,v 1.4 2016/01/26 23:12:17 pooka Exp $       */
+/*     $NetBSD: sysproxy.c,v 1.5 2019/04/18 08:31:44 ozaki-r Exp $     */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v 1.4 2016/01/26 23:12:17 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v 1.5 2019/04/18 08:31:44 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/filedesc.h>
@@ -35,6 +35,7 @@
 #include <sys/syscallvar.h>
 #include <sys/systm.h>
 #include <sys/xcall.h>
+#include <sys/lockdebug.h>
 
 #define _RUMP_SYSPROXY
 #include <rump/rumpuser.h>
@@ -73,6 +74,10 @@
        retval[0] = regrv[0];
        retval[1] = regrv[1];
 
+       /* Sanity checks (from mi_userret) */
+       LOCKDEBUG_BARRIER(NULL, 0);
+       KASSERT(l->l_nopreempt == 0);
+
        return rv;
 }
 



Home | Main Index | Thread Index | Old Index