Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/vax/vax Pullup 1.89 by patch [ragge]:



details:   https://anonhg.NetBSD.org/src/rev/c160d51975bf
branches:  netbsd-1-5
changeset: 490083:c160d51975bf
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 22:29:14 2000 +0000

description:
Pullup 1.89 by patch [ragge]:
If a process is locked into memory with mlockall() (like ntpd is)
pmap_enter() will get called trying to wire an already wired page again
if sysctl() is called. To avoid a panic the "wired" check is moved after
the double-mapping check.

diffstat:

 sys/arch/vax/vax/pmap.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r ce8592ae4890 -r c160d51975bf sys/arch/vax/vax/pmap.c
--- a/sys/arch/vax/vax/pmap.c   Wed Nov 01 16:34:31 2000 +0000
+++ b/sys/arch/vax/vax/pmap.c   Wed Nov 01 22:29:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.82.2.2 2000/08/27 15:25:03 ragge Exp $         */
+/*     $NetBSD: pmap.c,v 1.82.2.3 2000/11/01 22:29:14 tv Exp $    */
 /*
  * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -748,10 +748,6 @@
 
        oldpte = patch[i] & ~(PG_V|PG_M);
 
-       /* No mapping change. Not allowed to happen. */
-       if (newpte == oldpte)
-               panic("pmap_enter onto myself");
-
        pv = pv_table + (p >> PGSHIFT);
 
        /* wiring change? */
@@ -760,6 +756,12 @@
                RECURSEEND;
                return (KERN_SUCCESS);
        }
+#ifdef DIAGNOSTIC
+       /* No mapping change. Not allowed to happen. */
+       if (newpte == oldpte)
+               panic("pmap_enter onto myself");
+#endif
+
        /* Changing mapping? */
        oldpte &= PG_FRAME;
        if ((newpte & PG_FRAME) == oldpte) {



Home | Main Index | Thread Index | Old Index