Module Name:    src
Committed By:   ozaki-r
Date:           Thu Apr 18 08:31:44 UTC 2019

Modified Files:
        src/sys/rump/kern/lib/libsysproxy: sysproxy.c

Log Message:
rump: add missing sanity checks at the end of syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/libsysproxy/sysproxy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libsysproxy/sysproxy.c
diff -u src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.4 src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.5
--- src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.4	Tue Jan 26 23:12:17 2016
+++ src/sys/rump/kern/lib/libsysproxy/sysproxy.c	Thu Apr 18 08:31:44 2019
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v
 #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 @@ hyp_syscall(int num, void *arg, long *re
 	retval[0] = regrv[0];
 	retval[1] = regrv[1];
 
+	/* Sanity checks (from mi_userret) */
+	LOCKDEBUG_BARRIER(NULL, 0);
+	KASSERT(l->l_nopreempt == 0);
+
 	return rv;
 }
 

Reply via email to