remove_guest_ctrl(cons->guest, V3_VM_CONSOLE_CONNECT);
deinit_queue(cons->queue);
+
+ palacios_spinlock_deinit(&(cons->lock));
palacios_free(cons);
}
list_del(&(pfile->file_node));
+ palacios_spinlock_deinit(&(pfile->lock));
+
palacios_free(pfile->path);
palacios_free(pfile);
palacios_spinlock_unlock_irqrestore(&(dev->lock),f2);
palacios_spinlock_unlock_irqrestore(&(host_dev->lock),f1);
+ palacios_spinlock_deinit(&(dev->lock));
+
palacios_host_dev_user_free(dev);
return 0;
static int host_dev_guest_deinit(struct v3_guest * guest, void * vm_data) {
- palacios_free(vm_data);
+ struct palacios_host_dev * host_dev = (struct palacios_host_dev *) vm_data;
+ palacios_spinlock_deinit(&(host_dev->lock));
+ palacios_free(host_dev);
return 0;
}
return 0;
}
+
+
+//
+// Should be a matching teardown function here, otherwise we
+// are at least leaking the lock from the lockchecker's perspective
+// we would like to be able to do a palacios_spinlock_deinit() here...
return 0;
}
-
+static int host_pci_deinit(void) {
+ palacios_spinlock_deinit(&lock);
+ return 0;
+}
static struct linux_ext host_pci_ext = {
.name = "HOST_PCI",
.init = host_pci_init,
+ .deinit = host_pci_deinit,
};
{
palacios_free_htable(mem_streams,1,1);
+ palacios_spinlock_deinit(&(user_streams->lock));
+
palacios_free(user_streams);
WARNING("Deinit of Palacios Keyed Streams likely leaked memory\n");
deinit_raw_interface(iface);
palacios_free(iface);
}
+
+ palacios_spinlock_deinit(&(packet_state.lock));
return 0;
}
free_ringbuf(stream->out_ring);
list_del(&(stream->stream_node));
+ palacios_spinlock_deinit(&(stream->lock));
palacios_free(stream);
}
vnet_brg_s.status = 0;
+ palacios_spinlock_deinit(&(vnet_brg_s.lock));
+
INFO("VNET LNX Bridge Deinit Finished\n");
}
vnet_ctrl_s.status = 0;
+ palacios_spinlock_deinit(&(vnet_ctrl_s.lock));
+
INFO("VNET Control Deinit Finished\n");
}
while (dequeue(queue)) {
ERROR("Freeing non-empty queue. PROBABLE MEMORY LEAK DETECTED\n");
}
+ palacios_spinlock_deinit(&(queue->lock));
}
struct gen_queue * create_queue(unsigned int max_entries) {
static void set_apic_tpr(struct apic_state *apic, uint32_t val);
-// No lcoking done
+// No locking done
static void init_apic_state(struct apic_state * apic, uint32_t id) {
apic->base_addr = DEFAULT_BASE_ADDR;
v3_remove_timer(core, apic->timer);
}
+ v3_lock_deinit(&(apic->irq_queue.lock));
+
// unhook memory
}
v3_unhook_msr(vm, BASE_ADDR_MSR);
+ v3_lock_deinit(&(apic_dev->state_lock));
+
V3_Free(apic_dev);
return 0;
}
// unhook host events
+ v3_lock_deinit(&(kbd->kb_lock));
+
V3_Free(kbd);
return 0;
}
V3_Free(backend);
}
+ v3_lock_deinit(&(virtio->rx_lock));
+ v3_lock_deinit(&(virtio->tx_lock));
+
V3_Free(virtio);
return 0;
// unregister from PCI
+ v3_lock_deinit(&(vnet_state->lock));
+
V3_Free(vnet_state);
+
return 0;
}
v3_remove_timer(info,nvram_state->timer);
}
+ v3_lock_deinit(&(nvram_state->nvram_lock));
+
V3_Free(nvram_state);
return 0;
}
// kill thread... ?
+ v3_lock_deinit(&(state->cons_lock));
+
V3_Free(state);
return 0;
}
list_for_each_entry_safe(ctrlr, tmp, &(intr_state->controller_list), ctrl_node) {
v3_remove_intr_controller(core, ctrlr);
}
+
+ v3_lock_deinit(&(intr_state->irq_lock));
+
}
list_for_each_entry_safe(rtr, tmp, &(vm->intr_routers.router_list), router_node) {
v3_remove_intr_router(vm, rtr);
}
+
+ v3_lock_deinit(&(vm->intr_routers.irq_lock));
}
void * v3_register_intr_controller(struct guest_info * info, struct intr_ctrl_ops * ops, void * priv_data) {