Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550247

Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock
Date 2017-01-03 23:10 +0100
Message-ID <sVFrj-48v-15@gated-at.bofh.it> (permalink)
References (3 earlier) <sVfdv-2gm-15@gated-at.bofh.it> <sVtzQ-4gf-9@gated-at.bofh.it> <sVuPf-4XV-17@gated-at.bofh.it> <sVw4G-5Va-11@gated-at.bofh.it> <sVB4l-1a8-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2017-01-04 1:23 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>
>
> 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.

Thanks Paolo, I will send out a formal one soon.

Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] KVM: ioapic: fix NULL deref ioapic->lock Wanpeng Li <kernellwp@gmail.com> - 2017-01-01 04:50 +0100
  Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Paolo Bonzini <pbonzini@redhat.com> - 2017-01-02 11:10 +0100
    Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Dmitry Vyukov <dvyukov@google.com> - 2017-01-02 11:20 +0100
      Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Paolo Bonzini <pbonzini@redhat.com> - 2017-01-02 19:10 +0100
        Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Wanpeng Li <kernellwp@gmail.com> - 2017-01-02 23:40 +0100
        Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Dmitry Vyukov <dvyukov@google.com> - 2017-01-03 10:30 +0100
          Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Wanpeng Li <kernellwp@gmail.com> - 2017-01-03 11:50 +0100
            Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock David Hildenbrand <david@redhat.com> - 2017-01-03 13:10 +0100
              Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Paolo Bonzini <pbonzini@redhat.com> - 2017-01-03 18:30 +0100
                Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock Wanpeng Li <kernellwp@gmail.com> - 2017-01-03 23:10 +0100

csiph-web