diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0be75d53b7fd..7ce6367c1976 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2188,7 +2188,7 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
2188 | sizeof(struct kvm_pit_config))) | 2188 | sizeof(struct kvm_pit_config))) |
2189 | goto out; | 2189 | goto out; |
2190 | create_pit: | 2190 | create_pit: |
2191 | mutex_lock(&kvm->lock); | 2191 | down_write(&kvm->slots_lock); |
2192 | r = -EEXIST; | 2192 | r = -EEXIST; |
2193 | if (kvm->arch.vpit) | 2193 | if (kvm->arch.vpit) |
2194 | goto create_pit_unlock; | 2194 | goto create_pit_unlock; |
@@ -2197,7 +2197,7 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
2197 | if (kvm->arch.vpit) | 2197 | if (kvm->arch.vpit) |
2198 | r = 0; | 2198 | r = 0; |
2199 | create_pit_unlock: | 2199 | create_pit_unlock: |
2200 | mutex_unlock(&kvm->lock); | 2200 | up_write(&kvm->slots_lock); |
2201 | break; | 2201 | break; |
2202 | case KVM_IRQ_LINE_STATUS: | 2202 | case KVM_IRQ_LINE_STATUS: |
2203 | case KVM_IRQ_LINE: { | 2203 | case KVM_IRQ_LINE: { |