Module Name:    src
Committed By:   yamt
Date:           Sat Aug  1 15:30:33 UTC 2009

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

Log Message:
_uvm_map_sanity: fix a race which causes "stale hint".


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 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.271 src/sys/uvm/uvm_map.c:1.272
--- src/sys/uvm/uvm_map.c:1.271	Wed Jun 10 01:55:33 2009
+++ src/sys/uvm/uvm_map.c	Sat Aug  1 15:30:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.271 2009/06/10 01:55:33 yamt Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt 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.271 2009/06/10 01:55:33 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -502,6 +502,7 @@
 	bool first_free_found = false;
 	bool hint_found = false;
 	const struct vm_map_entry *e;
+	struct vm_map_entry *hint = map->hint;
 
 	e = &map->header; 
 	for (;;) {
@@ -512,7 +513,7 @@
 			    map->first_free, e);
 			return -1;
 		}
-		if (map->hint == e) {
+		if (hint == e) {
 			hint_found = true;
 		}
 

Reply via email to