DragonFly BSD
DragonFly bugs List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: panic on boot


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Jul 2004 18:32:03 -0700 (PDT)

: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@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);
 }



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]