lkml.org 
[lkml]   [2016]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] KVM: remove buggy vcpu id check on vcpu creation
2016-04-20 18:09+0100, James Hogan:
> On Wed, Apr 20, 2016 at 07:02:10PM +0200, Radim Krčmář wrote:
>> 2016-04-20 17:44+0200, Greg Kurz:
>> > diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
>> > index 70ef1a43c114..0278ea146db5 100644
>> > --- a/arch/mips/kvm/mips.c
>> > +++ b/arch/mips/kvm/mips.c
>> > @@ -248,9 +248,14 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
>> > int err, size, offset;
>> > void *gebase;
>> > int i;
>> > + struct kvm_vcpu *vcpu;
>> >
>> > - struct kvm_vcpu *vcpu = kzalloc(sizeof(struct kvm_vcpu), GFP_KERNEL);
>> > + if (id >= KVM_MAX_VCPUS) {
>> > + err = -EINVAL;
>> > + goto out;
>>
>> 'vcpu' looks undefined at this point, so kfree in 'out:' may bug.
>
> Thats out_free_cpu I think?

My bad, it is. Thank you!

\
 
 \ /
  Last update: 2016-04-20 19:41    [W:0.075 / U:2.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site