X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_rbtree.c;h=ff63faa6286e8a524c3d317af9604d88f5c9ef5f;hb=88a3605446744969abe6f193a7bc20e62d5aa555;hp=3b15bcf679b8d4ae7c40fbaa3bb8c509b8edd635;hpb=266af4b5b19da7bee8e7445288c7c1cb3ee194c7;p=palacios.git 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); }