Module Name: src
Committed By: bouyer
Date: Sun Jan 30 16:31:42 UTC 2011
Modified Files:
src/sys/rump/librump/rumpkern: rump.c
Log Message:
Move rumpuser_sp_fini() after the kernel has completed shuwdown
(and especially, after filesystems have been unmounted).
This way, rump.halt returns once the rump kernel is really out of the
game, which avoids races issues in test scripts using a rump kernel.
OK pooka@
To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/rump/librump/rumpkern/rump.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/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.226 src/sys/rump/librump/rumpkern/rump.c:1.227
--- src/sys/rump/librump/rumpkern/rump.c:1.226 Fri Jan 28 19:21:29 2011
+++ src/sys/rump/librump/rumpkern/rump.c Sun Jan 30 16:31:42 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.226 2011/01/28 19:21:29 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.227 2011/01/30 16:31:42 bouyer Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.226 2011/01/28 19:21:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.227 2011/01/30 16:31:42 bouyer Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -536,7 +536,6 @@
finiarg = curproc->p_vmspace->vm_map.pmap;
else
finiarg = NULL;
- rumpuser_sp_fini(finiarg);
/* dump means we really take the dive here */
if ((howto & RB_DUMP) || panicstr) {
@@ -552,6 +551,7 @@
/* your wish is my command */
if (howto & RB_HALT) {
printf("rump kernel halted\n");
+ rumpuser_sp_fini(finiarg);
for (;;) {
uint64_t sec = 5, nsec = 0;
int error;
@@ -563,6 +563,7 @@
/* this function is __dead, we must exit */
out:
printf("halted\n");
+ rumpuser_sp_fini(finiarg);
rumpuser_exit(ruhow);
}