]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: fix lock imbalance in kvm_*_irq_source_id()
authorJiri Slaby <jirislaby@gmail.com>
Fri, 25 Sep 2009 07:33:38 +0000 (09:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:02:49 +0000 (15:02 -0800)
commiteaccd490b0128d11ce2ea4d9d89e092661ae90b5
tree3215b673d9a7c47d14f718499b8fef9e0a9694ba
parent9801911326462a332d83eb508f1120bd45178426
KVM: fix lock imbalance in kvm_*_irq_source_id()

commit 0c6ddcebd8303ada6faefa6f72ac18b6230320c4 upstream.

Stanse found 2 lock imbalances in kvm_request_irq_source_id and
kvm_free_irq_source_id. They omit to unlock kvm->irq_lock on fail paths.

Fix that by adding unlock labels at the end of the functions and jump
there from the fail paths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
virt/kvm/irq_comm.c