From f86fbe29800b57dfe877a30c9a6ee3a0342ebd20 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 6 Jul 2019 06:54:11 +0200 Subject: [PATCH] 5.1-stable patches added patches: kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch --- ...-degrade-warn-to-pr_warn_ratelimited.patch | 44 +++++++++++++++++++ queue-5.1/series | 1 + 2 files changed, 45 insertions(+) create mode 100644 queue-5.1/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch diff --git a/queue-5.1/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch b/queue-5.1/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch new file mode 100644 index 00000000000..e3a48c787ef --- /dev/null +++ b/queue-5.1/kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch @@ -0,0 +1,44 @@ +From 3f16a5c318392cbb5a0c7a3d19dff8c8ef3c38ee Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Wed, 26 Jun 2019 14:16:13 +0200 +Subject: KVM: x86: degrade WARN to pr_warn_ratelimited + +From: Paolo Bonzini + +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 +Acked-by: Alexander Potapenko +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1547,7 +1547,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; + } + } +@@ -1557,8 +1557,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; + } + diff --git a/queue-5.1/series b/queue-5.1/series index dd11ded6377..2f3a267a62b 100644 --- a/queue-5.1/series +++ b/queue-5.1/series @@ -82,3 +82,4 @@ mm-vmscan.c-prevent-useless-kswapd-loops.patch btrfs-ensure-replaced-device-doesn-t-have-pending-chunk-allocation.patch tty-rocket-fix-incorrect-forward-declaration-of-rp_i.patch s390-mm-fix-pxd_bad-with-folded-page-tables.patch +kvm-x86-degrade-warn-to-pr_warn_ratelimited.patch -- 2.47.3