diff options
author | Eric Biggers <ebiggers@google.com> | 2017-12-21 01:24:27 +0100 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-02-02 17:49:55 +0100 |
commit | 8dbfb2bf1bb3848a8069164e205635b2675c24fe (patch) | |
tree | 73d504a4b5641c7171b055b22770a8a5d786e6b7 /arch | |
parent | Merge tag 'kvm-ppc-next-4.16-1' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-8dbfb2bf1bb3848a8069164e205635b2675c24fe.tar.xz linux-8dbfb2bf1bb3848a8069164e205635b2675c24fe.zip |
KVM: x86: don't forget vcpu_put() in kvm_arch_vcpu_ioctl_set_sregs()
Due to a bad merge resolution between commit f29810335965 ("KVM/x86:
Check input paging mode when cs.l is set") and commit b4ef9d4e8cb8
("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_set_sregs"),
there is a case in kvm_arch_vcpu_ioctl_set_sregs() where vcpu_put() is
not called after vcpu_get(). Fix it.
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0e27ee573bd5..07d1c7f66d97 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7706,7 +7706,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, goto out; if (kvm_valid_sregs(vcpu, sregs)) - return -EINVAL; + goto out; apic_base_msr.data = sregs->apic_base; apic_base_msr.host_initiated = true; |