lkml.org 
[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock
From
Date


On 03/01/2017 13:06, David Hildenbrand wrote:
>>
>> switch (cap->cap) {
>> case KVM_CAP_HYPERV_SYNIC:
>> - return kvm_hv_activate_synic(vcpu);
>> + if (!irqchip_in_kernel(vcpu->kvm))
>> + return -EINVAL;
>> + else
>
> You can simply drop the else and return directly.
>
> Can't really say if this is the right fix, my first thought was that
> a request has been set although it should never have been set for
> that VCPU. Maybe that is an effect of synic being activated
> (because synic code unconditionally later on sets the request).
>
> Fixing the cause of the request seems better than fixing up the result.

Yes, I agree. Wanpeng's second patch is fine.

Paolo

\
 
 \ /
  Last update: 2017-01-03 18:27    [W:0.647 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site