Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm add back rev. 1.29 of vm/vm_map.c, which was apparen...



details:   https://anonhg.NetBSD.org/src/rev/260b887c2105
branches:  trunk
changeset: 574451:260b887c2105
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Feb 28 16:55:54 2005 +0000

description:
add back rev. 1.29 of vm/vm_map.c, which was apparently lost in the UVM merge:
msync(MS_INVALIDATE) should fail if any part of the region is wired.

diffstat:

 sys/uvm/uvm_map.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r e606b3e4972b -r 260b887c2105 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Mon Feb 28 16:20:59 2005 +0000
+++ b/sys/uvm/uvm_map.c Mon Feb 28 16:55:54 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.185 2005/02/26 22:31:44 perry Exp $      */
+/*     $NetBSD: uvm_map.c,v 1.186 2005/02/28 16:55:54 chs Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.185 2005/02/26 22:31:44 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.186 2005/02/28 16:55:54 chs Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -3422,7 +3422,7 @@
        }
 
        /*
-        * Make a first pass to check for holes.
+        * Make a first pass to check for holes and wiring problems.
         */
 
        for (current = entry; current->start < end; current = current->next) {
@@ -3430,6 +3430,10 @@
                        vm_map_unlock_read(map);
                        return EINVAL;
                }
+               if ((flags & PGO_FREE) != 0 && VM_MAPENT_ISWIRED(entry)) {
+                       vm_map_unlock_read(map);
+                       return EBUSY;
+               }
                if (end <= current->end) {
                        break;
                }



Home | Main Index | Thread Index | Old Index