Commit 8dbfb2bf authored by Eric Biggers's avatar Eric Biggers Committed by Radim Krčmář

KVM: x86: don't forget vcpu_put() in kvm_arch_vcpu_ioctl_set_sregs()

Due to a bad merge resolution between commit f2981033 ("KVM/x86:
Check input paging mode when cs.l is set") and commit b4ef9d4e
("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: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent d2b9b207
...@@ -7706,7 +7706,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, ...@@ -7706,7 +7706,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
goto out; goto out;
if (kvm_valid_sregs(vcpu, sregs)) if (kvm_valid_sregs(vcpu, sregs))
return -EINVAL; goto out;
apic_base_msr.data = sregs->apic_base; apic_base_msr.data = sregs->apic_base;
apic_base_msr.host_initiated = true; apic_base_msr.host_initiated = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment