* [patch] add some unlocks on error paths irq_comm.c
@ 2009-11-10 8:57 Dan Carpenter
2009-11-12 23:35 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2009-11-10 8:57 UTC (permalink / raw)
To: kvm; +Cc: avi, mtosatti
There were a couple unlocks missing. They were found by smatch static
checker. Compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/virt/kvm/irq_comm.c 2009-11-08 19:00:50.000000000 +0200
+++ devel/virt/kvm/irq_comm.c 2009-11-08 19:04:45.000000000 +0200
@@ -209,6 +209,7 @@
sizeof(kvm->arch.irq_sources_bitmap));
if (irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
+ mutex_unlock(&kvm->irq_lock);
printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n");
return -EFAULT;
}
@@ -229,6 +230,7 @@
mutex_lock(&kvm->irq_lock);
if (irq_source_id < 0 ||
irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
+ mutex_unlock(&kvm->irq_lock);
printk(KERN_ERR "kvm: IRQ source ID out of range!\n");
return;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] add some unlocks on error paths irq_comm.c
2009-11-10 8:57 [patch] add some unlocks on error paths irq_comm.c Dan Carpenter
@ 2009-11-12 23:35 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2009-11-12 23:35 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kvm, avi
Dan,
This has already been fixed by commit
57225096e5888d84e84224bac13aae2aaed89280.
Thanks.
On Tue, Nov 10, 2009 at 10:57:09AM +0200, Dan Carpenter wrote:
> There were a couple unlocks missing. They were found by smatch static
> checker. Compile tested.
>
> regards,
> dan carpenter
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> --- orig/virt/kvm/irq_comm.c 2009-11-08 19:00:50.000000000 +0200
> +++ devel/virt/kvm/irq_comm.c 2009-11-08 19:04:45.000000000 +0200
> @@ -209,6 +209,7 @@
> sizeof(kvm->arch.irq_sources_bitmap));
>
> if (irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
> + mutex_unlock(&kvm->irq_lock);
> printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n");
> return -EFAULT;
> }
> @@ -229,6 +230,7 @@
> mutex_lock(&kvm->irq_lock);
> if (irq_source_id < 0 ||
> irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
> + mutex_unlock(&kvm->irq_lock);
> printk(KERN_ERR "kvm: IRQ source ID out of range!\n");
> return;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-12 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 8:57 [patch] add some unlocks on error paths irq_comm.c Dan Carpenter
2009-11-12 23:35 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox