aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2010-07-07 09:02:25 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 23:40:31 -0400
commit673813e81d8468e80b6dd0fa839923eb9748dc49 (patch)
tree82525c28fb88307046055c23d336bdd48dfd44a9 /arch/x86
parentf59c1d2ded54e4bd7a9126f4a32c9eca8b336457 (diff)
KVM: fix lock imbalance in kvm_create_pit()
Stanse found that there is an omitted unlock in kvm_create_pit in one fail path. Add proper unlock there. Signed-off-by: Jiri Slaby <jirislaby@gmail.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: x86@kernel.org Cc: Gleb Natapov <gleb@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Gregory Haskins <ghaskins@novell.com> Cc: kvm@vger.kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/i8254.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 467cc47fb733..70db4d435393 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -696,6 +696,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
696 696
697 pit->wq = create_singlethread_workqueue("kvm-pit-wq"); 697 pit->wq = create_singlethread_workqueue("kvm-pit-wq");
698 if (!pit->wq) { 698 if (!pit->wq) {
699 mutex_unlock(&pit->pit_state.lock);
699 kfree(pit); 700 kfree(pit);
700 return NULL; 701 return NULL;
701 } 702 }