#include <linux/elf.h>
#include <linux/uaccess.h>
-#include <linux/vmalloc.h>
#include <linux/module.h>
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;
}
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;
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;
}