提交 27c4ba60 编写于 作者: J Jiri Slaby 提交者: Avi Kivity

KVM: fix lock imbalance

There is a missing unlock on one fail path in ioapic_mmio_write,
fix that.
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 22fc0294
......@@ -292,7 +292,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
data = *(u32 *) val;
else {
printk(KERN_WARNING "ioapic: Unsupported size %d\n", len);
return 0;
goto unlock;
}
addr &= 0xff;
......@@ -313,6 +313,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
default:
break;
}
unlock:
mutex_unlock(&ioapic->kvm->irq_lock);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册