From: Paolo Bonzini <pbonzini@redhat.com>
To: Wang Kai <morgan.wang@huawei.com>, gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] kvm: x86: fix kvm_apic_has_events to check for NULL pointer
Date: Wed, 29 Jul 2015 10:19:16 +0200 [thread overview]
Message-ID: <55B88C84.6060103@redhat.com> (raw)
In-Reply-To: <1438145794-187789-2-git-send-email-morgan.wang@huawei.com>
On 29/07/2015 06:56, Wang Kai wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
>
> commit ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009 upstream.
>
> Malicious (or egregiously buggy) userspace can trigger it, but it
> should never happen in normal operation.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> [wangkai: backport to 3.10: adjust context]
> Signed-off-by: Wang Kai <morgan.wang@huawei.com>
> ---
> arch/x86/kvm/lapic.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
> index c8b0d0d..fc87568 100644
> --- a/arch/x86/kvm/lapic.h
> +++ b/arch/x86/kvm/lapic.h
> @@ -165,7 +165,7 @@ static inline u16 apic_logical_id(struct kvm_apic_map *map, u32 ldr)
>
> static inline bool kvm_apic_has_events(struct kvm_vcpu *vcpu)
> {
> - return vcpu->arch.apic->pending_events;
> + return kvm_vcpu_has_lapic(vcpu) && vcpu->arch.apic->pending_events;
> }
>
> bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector);
>
Ack.
Paolo
next prev parent reply other threads:[~2015-07-29 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 4:56 [PATCH][request for stable 3.10 inclusion]CVE-2015-4692 Wang Kai
2015-07-29 4:56 ` [PATCH] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Wang Kai
2015-07-29 8:19 ` Paolo Bonzini [this message]
2015-08-14 16:58 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2015-06-04 8:18 Paolo Bonzini
2015-06-12 14:10 ` Josh Boyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B88C84.6060103@redhat.com \
--to=pbonzini@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=morgan.wang@huawei.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.