> +    struct kvm_pv_mmu_op_buffer *buffer =
 > +            kmalloc(GFP_KERNEL, sizeof(struct kvm_pv_mmu_op_buffer));

Surely this produces a warning?  kmalloc takes (size, flags) -- you have
them reversed here.

 > +            lapic = kzalloc(GFP_KERNEL, sizeof(*lapic));
 > +            lapic = kmalloc(GFP_KERNEL, sizeof(*lapic));
 > +    struct kvm_irqchip *chip = kmalloc(GFP_KERNEL, sizeof(*chip));
 > +            kvm_sregs = kmalloc(GFP_KERNEL, sizeof kvm_sregs);
 > +            fpu = kmalloc(GFP_KERNEL, sizeof(*fpu));

same for all of these places.

 > +    if (lapic)
 > +            kfree(lapic);

 > +    if (fpu)
 > +            kfree(fpu);
 > +    if (kvm_sregs)
 > +            kfree(kvm_sregs);

kfree(NULL) is fine, so you can remove the if()s here.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to