X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_rbtree.c;h=ff63faa6286e8a524c3d317af9604d88f5c9ef5f;hp=3b15bcf679b8d4ae7c40fbaa3bb8c509b8edd635;hb=88a3605446744969abe6f193a7bc20e62d5aa555;hpb=d775bbfa668ce9968bacc0e4257cf86e5ab88e90 diff --git a/palacios/src/palacios/vmm_rbtree.c b/palacios/src/palacios/vmm_rbtree.c index 3b15bcf..ff63faa 100644 --- a/palacios/src/palacios/vmm_rbtree.c +++ b/palacios/src/palacios/vmm_rbtree.c @@ -287,7 +287,10 @@ void v3_rb_erase(struct rb_node *node, struct rb_root *root) root->rb_node = child; color: - if (color == RB_BLACK) + // parent check here is because a possible + // codepath here has parent=null, which would + // be a disaster in kernel + if (color == RB_BLACK && parent) __rb_erase_color(child, parent, root); }