Module Name:    src
Committed By:   maxv
Date:           Sun Mar  3 17:37:36 UTC 2019

Modified Files:
        src/sys/uvm: uvm_map.c

Log Message:
Fix bug, the entry we're iterating on is 'current', not 'entry'. Here only
the first entry gets wired in.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/sys/uvm/uvm_map.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/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.357 src/sys/uvm/uvm_map.c:1.358
--- src/sys/uvm/uvm_map.c:1.357	Mon Dec 17 06:53:01 2018
+++ src/sys/uvm/uvm_map.c	Sun Mar  3 17:37:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.357 2018/12/17 06:53:01 kamil Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.358 2019/03/03 17:37:36 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.357 2018/12/17 06:53:01 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.358 2019/03/03 17:37:36 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -3098,7 +3098,7 @@ uvm_map_protect(struct vm_map *map, vadd
 			/* update pmap! */
 			uvm_map_lock_entry(current);
 			pmap_protect(map->pmap, current->start, current->end,
-			    current->protection & MASK(entry));
+			    current->protection & MASK(current));
 			uvm_map_unlock_entry(current);
 
 			/*
@@ -3124,11 +3124,11 @@ uvm_map_protect(struct vm_map *map, vadd
 		 */
 
 		if ((map->flags & VM_MAP_WIREFUTURE) != 0 &&
-		    VM_MAPENT_ISWIRED(entry) == 0 &&
+		    VM_MAPENT_ISWIRED(current) == 0 &&
 		    old_prot == VM_PROT_NONE &&
 		    new_prot != VM_PROT_NONE) {
-			if (uvm_map_pageable(map, entry->start,
-			    entry->end, false,
+			if (uvm_map_pageable(map, current->start,
+			    current->end, false,
 			    UVM_LK_ENTER|UVM_LK_EXIT) != 0) {
 
 				/*

Reply via email to