Module Name: src Committed By: yamt Date: Sat Aug 1 15:32:02 UTC 2009
Modified Files: src/sys/uvm: uvm_map.c Log Message: _uvm_tree_sanity: fix an assertion. To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 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.272 src/sys/uvm/uvm_map.c:1.273 --- src/sys/uvm/uvm_map.c:1.272 Sat Aug 1 15:30:33 2009 +++ src/sys/uvm/uvm_map.c Sat Aug 1 15:32:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 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.272 2009/08/01 15:30:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -551,7 +551,10 @@ * If any entries are out of order, tmp->gap will be unsigned * and will likely exceed the size of the map. */ - KASSERT(tmp->gap < map->size); + if (tmp->gap >= vm_map_max(map) - vm_map_min(map)) { + printf("too large gap %zu\n", (size_t)tmp->gap); + goto error; + } n++; }