[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171221120226.1bbda8c1@canb.auug.org.au>
Date: Thu, 21 Dec 2017 12:02:26 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Eric Biggers <ebiggers3@...il.com>, kvm@...r.kernel.org,
rkrcmar@...hat.com, tianyu.lan@...el.com,
christoffer.dall@...aro.org, x86@...nel.org,
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com,
Eric Biggers <ebiggers@...gle.com>,
Linux-Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: [PATCH linux-next] KVM: x86: don't forget vcpu_put() in
kvm_arch_vcpu_ioctl_set_sregs()
Hi Paolo,
On Thu, 21 Dec 2017 01:30:30 +0100 Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> On 21/12/2017 01:24, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@...gle.com>
> >
> > 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@...glegroups.com>
> > Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> > ---
> > arch/x86/kvm/x86.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index ea3a98196753..f4e8b5089b28 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -7624,7 +7624,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;
> >
>
> Thanks very much Eric, that was fast! Adding Stephen and the linux-next
> mailing list to Cc. Adding the kvm/master tree has already paid off.
I will apply that as a merge fix patch for the kvm tree merge from
today. Please remember to apply it if/when you merge the master branch
into your linux-next branch or when these trees meet in Linus' tree.
--
Cheers,
Stephen Rothwell
Powered by blists - more mailing lists