Module Name:    src
Committed By:   chs
Date:           Sat Jan 21 16:51:38 UTC 2012

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

Log Message:
fix UVM_MAP_CLIP_* to only clip if the clip address is within the entry
(which would only not be true if the clip address is at one of the boundaries
of the entry).  fixes PR 44788.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/uvm/uvm_map.h

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.h
diff -u src/sys/uvm/uvm_map.h:1.68 src/sys/uvm/uvm_map.h:1.69
--- src/sys/uvm/uvm_map.h:1.68	Tue Dec 20 15:41:01 2011
+++ src/sys/uvm/uvm_map.h	Sat Jan 21 16:51:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.h,v 1.68 2011/12/20 15:41:01 reinoud Exp $	*/
+/*	$NetBSD: uvm_map.h,v 1.69 2012/01/21 16:51:38 chs Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -82,7 +82,10 @@
  */
 
 #define UVM_MAP_CLIP_START(MAP,ENTRY,VA,UMR) { \
-	if ((VA) > (ENTRY)->start) uvm_map_clip_start(MAP,ENTRY,VA,UMR); }
+	if ((VA) > (ENTRY)->start && (VA) < (ENTRY)->end) { \
+		uvm_map_clip_start(MAP,ENTRY,VA,UMR); \
+	} \
+}
 
 /*
  * UVM_MAP_CLIP_END: ensure that the entry ends at or before
@@ -92,7 +95,10 @@
  */
 
 #define UVM_MAP_CLIP_END(MAP,ENTRY,VA,UMR) { \
-	if ((VA) < (ENTRY)->end) uvm_map_clip_end(MAP,ENTRY,VA,UMR); }
+	if ((VA) > (ENTRY)->start && (VA) < (ENTRY)->end) { \
+		uvm_map_clip_end(MAP,ENTRY,VA,UMR); \
+	} \
+} 
 
 /*
  * extract flags

Reply via email to