Re: [PATCH v4 7/8] KVM: Pre-allocate cpumasks for kvm_make_all_cpus_request_except()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 03, 2021, Vitaly Kuznetsov wrote:
> Sean Christopherson <seanjc@xxxxxxxxxx> writes:
> >> @@ -5581,9 +5583,15 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> >>  		goto out_free_3;
> >>  	}
> >>  
> >> +	for_each_possible_cpu(cpu) {
> >> +		if (!alloc_cpumask_var_node(&per_cpu(cpu_kick_mask, cpu),
> >> +					    GFP_KERNEL, cpu_to_node(cpu)))
> >> +			goto out_free_4;
> >
> > 'r' needs to be explicitly set to -EFAULT, e.g. in the current code it's
> > guaranteed to be 0 here.
> 
> Oops, yes. Any particular reason to avoid -ENOMEM? (hope not, will use
> this in v5)

Huh.  Yes, -ENOMEM.  I have no idea why I typed -EFAULT.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux