summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-06-23 13:18:16 -0700
committerRobert Mustacchi <rm@joyent.com>2011-06-23 13:18:16 -0700
commit260427e17c6028d8748c72e25c32efcc6b4a78d1 (patch)
tree0b0f55452bbfa438f427c3fec6b9f3a166c663b4
parent08ed7f46587d750834588d85f66c5c2bbf88d337 (diff)
downloadillumos-kvm-260427e17c6028d8748c72e25c32efcc6b4a78d1.tar.gz
HVM-409 panic in kvm_free_irq_routing
-rw-r--r--kvm_irq_comm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kvm_irq_comm.c b/kvm_irq_comm.c
index d8f259d..82dfd4a 100644
--- a/kvm_irq_comm.c
+++ b/kvm_irq_comm.c
@@ -392,13 +392,15 @@ out:
return (r);
}
+/*
+ * Called only during vm destruction. Nobody can use the pointer at this stage
+ */
void
kvm_free_irq_routing(struct kvm *kvm)
{
- /*
- * Called only during vm destruction. Nobody can use the pointer
- * at this stage
- */
+ if (kvm->irq_routing == NULL)
+ return;
+
kmem_free(kvm->irq_routing->rt_entries, kvm->irq_routing_sz);
kmem_free(kvm->irq_routing, sizeof (struct kvm_irq_routing_table));
}