diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2010-07-07 17:02:25 +0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-02 07:40:31 +0400 |
commit | 673813e81d8468e80b6dd0fa839923eb9748dc49 (patch) | |
tree | 82525c28fb88307046055c23d336bdd48dfd44a9 /arch | |
parent | f59c1d2ded54e4bd7a9126f4a32c9eca8b336457 (diff) | |
download | linux-673813e81d8468e80b6dd0fa839923eb9748dc49.tar.xz |
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')
-rw-r--r-- | arch/x86/kvm/i8254.c | 1 |
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) pit->wq = create_singlethread_workqueue("kvm-pit-wq"); if (!pit->wq) { + mutex_unlock(&pit->pit_state.lock); kfree(pit); return NULL; } |