lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f0b0708-0dda-85d4-a0a0-2d532d46db18@redhat.com>
Date:   Tue, 3 Jan 2017 18:23:06 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     David Hildenbrand <david@...hat.com>,
        Wanpeng Li <kernellwp@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        KVM list <kvm@...r.kernel.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH] KVM: ioapic: fix NULL deref ioapic->lock



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ