panic on boot

Matthew Dillon dillon at apollo.backplane.com
Tue Jul 20 18:32:20 PDT 2004


:Something between RC2 and 1.0 seem to be causing triggering
:the following assertion during boot on one of my machines.
:
:assertion:
:gd->gd_vme_base != NULL in vm_map_entry_kreserve
:
:backtrace:
:vm_map_entry_kreserve
:
:	-Richard

    Richard, please try the below patch and tell me if it works.  It looks
    like I was improperly decrementing the gd_vme_avail count in the
    blockable case (normal reserve) which caused the non-blockable case
    (kreserve) to panic.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

Index: vm/vm_map.c
===================================================================
RCS file: /cvs/src/sys/vm/vm_map.c,v
retrieving revision 1.29
diff -u -r1.29 vm_map.c
--- vm/vm_map.c	21 Jul 2004 01:25:18 -0000	1.29
+++ vm/vm_map.c	21 Jul 2004 01:30:06 -0000
@@ -358,18 +358,18 @@
 	vm_map_entry_t entry;
 
 	crit_enter();
-	gd->gd_vme_avail -= count;
 
 	/*
 	 * Make sure we have enough structures in gd_vme_base to handle
 	 * the reservation request.
 	 */
-	while (gd->gd_vme_avail < 0) {
+	while (gd->gd_vme_avail < count) {
 		entry = zalloc(mapentzone);
 		entry->next = gd->gd_vme_base;
 		gd->gd_vme_base = entry;
 		++gd->gd_vme_avail;
 	}
+	gd->gd_vme_avail -= count;
 	crit_exit();
 	return(count);
 }





More information about the Bugs mailing list