Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Clean up hashtable frees to fix rmmod crash on redhat
Peter Dinda [Fri, 4 Oct 2013 18:22:49 +0000 (13:22 -0500)]
linux_module/buddy.c
palacios/src/palacios/vmm_cpu_mapper.c
palacios/src/palacios/vmm_scheduler.c
v3_config_guest.pl

index 37f3fec..a68d786 100644 (file)
@@ -422,8 +422,8 @@ buddy_free(
     pool = find_mempool(zone, addr);
 
     if ((pool == NULL) || (order > pool->pool_order)) {
-       WARNING("Attempted to free an invalid page address (%p)\n", (void *)addr);
-       palacios_spinlock_unlock_irqrestore(&(zone->lock), flags);
+      WARNING("Attempted to free an invalid page address (%p) - pool=%p order=%lu\n", (void *)addr,pool,order);
+      palacios_spinlock_unlock_irqrestore(&(zone->lock), flags);
        return;
     }
 
index e2e34bc..626f50f 100644 (file)
@@ -60,7 +60,10 @@ int V3_init_cpu_mapper() {
 int V3_deinit_cpu_mapper() {
 
     destroy_default_cpu_mapper();
-    v3_free_htable(master_cpu_mapper_table, 1, 1);
+    // we must leave the keys and values unfreed
+    // since we have no idea whether they are heap or otherwise
+    // the user must have done appropriate unregisters before this
+    v3_free_htable(master_cpu_mapper_table, 0, 0);
     return 0;
 }
 
@@ -250,5 +253,6 @@ static int create_default_cpu_mapper()
 static int destroy_default_cpu_mapper()
 {
        v3_unregister_cpu_mapper(default_mapper_impl.name);
+       // note - is not deleted since it's a global... 
        return 0;
 }
index c214d63..07600bf 100644 (file)
@@ -59,7 +59,9 @@ int V3_init_scheduling() {
 int V3_deinit_scheduling()
 {
     destroy_host_scheduler();
-    v3_free_htable(master_scheduler_table,1,1);
+    // important not to remove any keys or values since we don't know
+    // if they are malloced or other
+    v3_free_htable(master_scheduler_table,0,0);
     return 0;
 }
 
@@ -331,5 +333,6 @@ static int create_host_scheduler()
 static int destroy_host_scheduler()
 {
        v3_unregister_scheduler(host_sched_impl.name);
+       // no deletion of this since it's a pointer to a global var
        return 0;
 }
index a925cc7..dd781e2 100755 (executable)
@@ -11,10 +11,10 @@ there may be hidden Linux assumptions.
 The tool assumes you have already built Palacios, the Linux embedding,
 and the Linux user-sapce tools.  If you haven't done this, hit CTRL-C
 now, configure and build Palacios, the user-space tools, and run
-v3_config.pl.
+v3_config_v3vee.pl.
 
 This tool also assumes that you have the environment produced by
-v3_config.pl sourced:
+v3_config_v3vee.pl sourced:
 
   source ./ENV