X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-code-inject.c;h=1262d772d1db80139dcdb43305efc0a708d2ec95;hb=e8ee9e1536b3fa2e69f5537a90f5e034e9529248;hp=db7464890688c19412f289c3450cff7462f5fab4;hpb=5c2a2684778fa080c41a0f04518721ebe476efb1;p=palacios.git diff --git a/linux_module/iface-code-inject.c b/linux_module/iface-code-inject.c index db74648..1262d77 100644 --- a/linux_module/iface-code-inject.c +++ b/linux_module/iface-code-inject.c @@ -55,7 +55,7 @@ static int vm_tophalf_inject (struct v3_guest * guest, unsigned int cmd, unsigne struct top_half_data * top; top = palacios_alloc(sizeof(struct top_half_data)); - if (IS_ERR(top)) { + if (!top) { ERROR("Palacios Error: could not allocate space for top half data\n"); return -EFAULT; } @@ -81,7 +81,7 @@ static int vm_tophalf_inject (struct v3_guest * guest, unsigned int cmd, unsigne DEBUG("Palacios: Allocating %lu B of kernel memory for ELF binary data...\n", top->elf_size); top->elf_data = palacios_alloc(top->elf_size); - if (IS_ERR(top->elf_data)) { + if (!(top->elf_data)) { ERROR("Palacios Error: could not allocate space for binary image\n"); palacios_free(top); return -EFAULT; @@ -135,6 +135,7 @@ static int guest_init_code_inject (struct v3_guest * guest, void ** vm_data) { static int guest_deinit_code_inject (struct v3_guest * guest, void * vm_data) { free_inject_data(); + remove_guest_ctrl(guest, V3_VM_TOPHALF_INJECT); return 0; }