aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorXiaotian Feng <dfeng@redhat.com>2010-08-13 04:23:06 -0400
committerAvi Kivity <avi@redhat.com>2010-08-15 07:17:35 -0400
commit3185bf8c23149f32d7e7363b84539ea50b26ecb1 (patch)
tree903631f12d5a536cd0437a634ddf62e37bb45131 /arch
parentf45755b8346f1a089ca7957dce5f4c3c6cb26e6f (diff)
KVM: destroy workqueue on kvm_create_pit() failures
kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise after pit is freed, the workqueue is leaked. Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Cc: Avi Kivity <avi@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Gregory Haskins <ghaskins@novell.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/i8254.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 0fd6378981f4..f539c3c2a687 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -742,7 +742,7 @@ fail:
742 kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier); 742 kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier);
743 kvm_unregister_irq_ack_notifier(kvm, &pit_state->irq_ack_notifier); 743 kvm_unregister_irq_ack_notifier(kvm, &pit_state->irq_ack_notifier);
744 kvm_free_irq_source_id(kvm, pit->irq_source_id); 744 kvm_free_irq_source_id(kvm, pit->irq_source_id);
745 745 destroy_workqueue(pit->wq);
746 kfree(pit); 746 kfree(pit);
747 return NULL; 747 return NULL;
748} 748}