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.


Minor tweak to fix accidental new feature leak
[palacios.git] / linux_module / buddy.c
index 43247b6..26a7021 100644 (file)
@@ -155,7 +155,7 @@ int buddy_add_pool(struct buddy_memzone * zone,
 
     mp = palacios_alloc_extended(sizeof(struct buddy_mempool), GFP_KERNEL, zone->node_id);
 
-    if (IS_ERR(mp)) {
+    if (!mp) {
        ERROR("Could not allocate mempool\n");
        return -1;
     }
@@ -174,6 +174,13 @@ int buddy_add_pool(struct buddy_memzone * zone,
                                  BITS_TO_LONGS(mp->num_blocks) * sizeof(long), GFP_KERNEL, zone->node_id
                                  );
 
+    if (!(mp->tag_bits)) { 
+       ERROR("Could not allocate tag_bits\n");
+       palacios_free(mp);
+       return -1;
+    }
+       
+
     /* Initially mark all minimum-sized blocks as allocated */
     bitmap_zero(mp->tag_bits, mp->num_blocks);