X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fvm.c;h=54d5efde8fbd7a1dbad360c0f82ff6d51affc461;hb=36a068547bf2342c7b7a29058df4cc8e0ff56291;hp=624cc39236a7de14c4661b7cbfcaed0a9f24f016;hpb=5ce19b21aac351221fe41e95e717127bfec0c467;p=palacios.git diff --git a/linux_module/vm.c b/linux_module/vm.c index 624cc39..54d5efd 100644 --- a/linux_module/vm.c +++ b/linux_module/vm.c @@ -132,11 +132,10 @@ int remove_guest_ctrl(struct v3_guest * guest, unsigned int cmd) { static void free_guest_ctrls(struct v3_guest * guest) { struct rb_node * node = rb_first(&(guest->vm_ctrls)); struct vm_ctrl * ctrl = NULL; - struct rb_node * tmp_node = NULL; while (node) { ctrl = rb_entry(node, struct vm_ctrl, tree_node); - tmp_node = node; + node = rb_next(node); WARNING("Cleaning up guest ctrl that was not removed explicitly (%d)\n", ctrl->cmd); @@ -231,7 +230,7 @@ static long v3_vm_ioctl(struct file * filp, return -EFAULT; } - NOTICE("Loading Guest to %s:%s\n", chkpt.store, chkpt.url); + NOTICE("Loading Guest from %s:%s\n", chkpt.store, chkpt.url); if (v3_load_vm(guest->v3_ctx, chkpt.store, chkpt.url) == -1) { WARNING("Error Loading VM state\n"); @@ -434,7 +433,9 @@ out_err: int free_palacios_vm(struct v3_guest * guest) { - v3_free_vm(guest->v3_ctx); + if (v3_free_vm(guest->v3_ctx)<0) { + return -1; + } device_destroy(v3_class, guest->vm_dev);