Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/mach Don't release the bootstrap port too much, a...



details:   https://anonhg.NetBSD.org/src/rev/c6e2d56c3bc0
branches:  trunk
changeset: 555472:c6e2d56c3bc0
user:      manu <manu%NetBSD.org@localhost>
date:      Tue Nov 18 15:57:13 2003 +0000

description:
Don't release the bootstrap port too much, as it is shared between
processes.

diffstat:

 sys/compat/mach/mach_exec.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 16b092122a52 -r c6e2d56c3bc0 sys/compat/mach/mach_exec.c
--- a/sys/compat/mach/mach_exec.c       Tue Nov 18 14:21:59 2003 +0000
+++ b/sys/compat/mach/mach_exec.c       Tue Nov 18 15:57:13 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mach_exec.c,v 1.37 2003/11/18 14:11:33 manu Exp $       */
+/*     $NetBSD: mach_exec.c,v 1.38 2003/11/18 15:57:13 manu Exp $       */
 
 /*-
  * Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.37 2003/11/18 14:11:33 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.38 2003/11/18 15:57:13 manu Exp $");
 
 #include "opt_syscall_debug.h"
 
@@ -259,8 +259,11 @@
                        mach_right_put_exclocked(mr, MACH_PORT_TYPE_ALL_RIGHTS);
                lockmgr(&med->med_rightlock, LK_RELEASE, NULL);
 
-               if (--med->med_bootstrap->mp_refcount == 0)
-                       mach_port_put(med->med_bootstrap);
+               /*
+                * Do not touch bootstrap port here, as it is 
+                * shared between all processes in our implementation.
+                * We do not want to release it.
+                */
                if (--med->med_kernel->mp_refcount == 0) 
                        mach_port_put(med->med_kernel);
                if (--med->med_host->mp_refcount == 0)  



Home | Main Index | Thread Index | Old Index