Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Move rumpuser_sp_fini() after the ...



details:   https://anonhg.NetBSD.org/src/rev/33783db3a815
branches:  trunk
changeset: 761502:33783db3a815
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Jan 30 16:31:42 2011 +0000

description:
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@

diffstat:

 sys/rump/librump/rumpkern/rump.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r d55847cd7d23 -r 33783db3a815 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Sun Jan 30 11:50:43 2011 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Sun Jan 30 16:31:42 2011 +0000
@@ -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);
 }
 



Home | Main Index | Thread Index | Old Index