]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jul 2019 04:53:56 +0000 (06:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jul 2019 04:53:56 +0000 (06:53 +0200)
added patches:
kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch

queue-4.19/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch b/queue-4.19/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch
new file mode 100644 (file)
index 0000000..fdd090a
--- /dev/null
@@ -0,0 +1,44 @@
+From 3f16a5c318392cbb5a0c7a3d19dff8c8ef3c38ee Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Wed, 26 Jun 2019 14:16:13 +0200
+Subject: KVM: x86: degrade WARN to pr_warn_ratelimited
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit 3f16a5c318392cbb5a0c7a3d19dff8c8ef3c38ee upstream.
+
+This warning can be triggered easily by userspace, so it should certainly not
+cause a panic if panic_on_warn is set.
+
+Reported-by: syzbot+c03f30b4f4c46bdf8575@syzkaller.appspotmail.com
+Suggested-by: Alexander Potapenko <glider@google.com>
+Acked-by: Alexander Potapenko <glider@google.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/x86.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kvm/x86.c
++++ b/arch/x86/kvm/x86.c
+@@ -1447,7 +1447,7 @@ static int set_tsc_khz(struct kvm_vcpu *
+                       vcpu->arch.tsc_always_catchup = 1;
+                       return 0;
+               } else {
+-                      WARN(1, "user requested TSC rate below hardware speed\n");
++                      pr_warn_ratelimited("user requested TSC rate below hardware speed\n");
+                       return -1;
+               }
+       }
+@@ -1457,8 +1457,8 @@ static int set_tsc_khz(struct kvm_vcpu *
+                               user_tsc_khz, tsc_khz);
+       if (ratio == 0 || ratio >= kvm_max_tsc_scaling_ratio) {
+-              WARN_ONCE(1, "Invalid TSC scaling ratio - virtual-tsc-khz=%u\n",
+-                        user_tsc_khz);
++              pr_warn_ratelimited("Invalid TSC scaling ratio - virtual-tsc-khz=%u\n",
++                                  user_tsc_khz);
+               return -1;
+       }
index 87309e9dd321d447c9eecf9781e5bfbb55c28803..290272b8f37678a3e6c00965ad38be7e74a169a0 100644 (file)
@@ -79,3 +79,4 @@ sc16is7xx-move-label-err_spi-to-correct-section.patch
 net-hns-fix-unsigned-comparison-to-less-than-zero.patch
 bpf-fix-bpf_jit_limit-knob-for-page_size-64k.patch
 netfilter-ipv6-nf_defrag-accept-duplicate-fragments-.patch
+kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch