]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Aug 2015 17:03:22 +0000 (10:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Aug 2015 17:03:22 +0000 (10:03 -0700)
added patches:
kvm-x86-fix-kvm_apic_has_events-to-check-for-null-pointer.patch

queue-4.1/kvm-x86-fix-kvm_apic_has_events-to-check-for-null-pointer.patch [new file with mode: 0644]
queue-4.1/series

diff --git a/queue-4.1/kvm-x86-fix-kvm_apic_has_events-to-check-for-null-pointer.patch b/queue-4.1/kvm-x86-fix-kvm_apic_has_events-to-check-for-null-pointer.patch
new file mode 100644 (file)
index 0000000..80f1b2a
--- /dev/null
@@ -0,0 +1,31 @@
+From ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Sat, 30 May 2015 14:31:24 +0200
+Subject: kvm: x86: fix kvm_apic_has_events to check for NULL pointer
+
+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>
+Signed-off-by: Wang Kai <morgan.wang@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/lapic.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/lapic.h
++++ b/arch/x86/kvm/lapic.h
+@@ -150,7 +150,7 @@ static inline bool kvm_apic_vid_enabled(
+ 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);
index ece08e70bb941d62e048661a54172dfb45fbc07f..d137b1d3e514bece5137bbbfd5fe20c2c6c49889 100644 (file)
@@ -80,3 +80,4 @@ mm-vmscan-do-not-wait-for-page-writeback-for-gfp_nofs-allocations.patch
 signalfd-fix-information-leak-in-signalfd_copyinfo.patch
 signal-fix-information-leak-in-copy_siginfo_to_user.patch
 signal-fix-information-leak-in-copy_siginfo_from_user32.patch
+kvm-x86-fix-kvm_apic_has_events-to-check-for-null-pointer.patch