Re: [PATCH 2/2] KVM: Guard cpusmask NULL check with CONFIG_CPUMASK_OFFSTACK

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

 



Sean Christopherson <seanjc@xxxxxxxxxx> writes:

> On Wed, Aug 25, 2021, Lai Jiangshan wrote:
>> On Sat, Aug 21, 2021 at 8:09 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>> > @@ -277,6 +277,14 @@ bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
>> >                 if (!(req & KVM_REQUEST_NO_WAKEUP) && kvm_vcpu_wake_up(vcpu))
>> >                         continue;
>> >
>> > +               /*
>> > +                * tmp can be NULL if cpumasks are allocated off stack, as
>> > +                * allocation of the mask is deliberately not fatal and is
>> > +                * handled by falling back to kicking all online CPUs.
>> > +                */
>> > +               if (IS_ENABLED(CONFIG_CPUMASK_OFFSTACK) && !tmp)
>> > +                       continue;
>> > +
>> 
>> Hello, Sean
>> 
>> I don't think it is a good idea to reinvent the cpumask_available().
>
> Using cpumask_available() is waaaay better, thanks!
>
> Vitaly / Paolo, take this one instead?
>

Sure, putting this to my v3, thanks!

-- 
Vitaly




[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