Commit 673813e81d8468e80b6dd0fa839923eb9748dc49

Authored by Jiri Slaby
Committed by Avi Kivity
1 parent f59c1d2ded

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

arch/x86/kvm/i8254.c
... ... @@ -696,6 +696,7 @@
696 696  
697 697 pit->wq = create_singlethread_workqueue("kvm-pit-wq");
698 698 if (!pit->wq) {
  699 + mutex_unlock(&pit->pit_state.lock);
699 700 kfree(pit);
700 701 return NULL;
701 702 }