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.


Ignore frees of null in all cases (kfree, vfree, pagefree)
Peter Dinda [Mon, 24 Mar 2014 21:59:03 +0000 (16:59 -0500)]
linux_module/palacios-stubs.c

index 694a212..965d578 100644 (file)
@@ -211,6 +211,7 @@ void palacios_free_pages(void * page_paddr, int num_pages) {
     if (!page_paddr) { 
        ERROR("Ignoring free pages: 0x%p (0x%lx)for %d pages\n", page_paddr, (uintptr_t)page_paddr, num_pages);
        dump_stack();
+       return;
     }
     pg_frees += num_pages;
     free_palacios_pgs((uintptr_t)page_paddr, num_pages);
@@ -283,6 +284,11 @@ palacios_valloc(unsigned int size)
 
 void palacios_vfree(void *p)
 {
+  if (!p) { 
+      ERROR("Ignoring vfree: 0x%p\n",p);
+      dump_stack();
+      return;
+  }
   vfree(p);
   vfrees++;
   MEMCHECK_VFREE(p);
@@ -318,6 +324,7 @@ palacios_free(
     if (!addr) {
        ERROR("Ignoring free : 0x%p\n", addr);
        dump_stack();
+       return;
     }
     frees++;
     kfree(addr-ALLOC_PAD);