Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7148717ybi; Mon, 8 Jul 2019 15:37:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAVcrz8oWi14f1JmQX7l4BqWtmoPKbAN2kQqqBJQZKVigOERCJLuaQ2qTK0ly9qK3X/+Zk X-Received: by 2002:a17:90a:246f:: with SMTP id h102mr28257075pje.126.1562625438069; Mon, 08 Jul 2019 15:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625438; cv=none; d=google.com; s=arc-20160816; b=visWq0wGcrilJ7F8oEMu269LS8ry0qu82naWCEnuFptQOs41G9xf30gGdudV/O0TKn g5yN8fwmg6ke3Rgi0zV4ikDXT9L5T9fVBUEi20QIz6ppRuNlQ955S1nlJtKWIYB1cgyp jciKgc3+iFWjxskidNXGd2AhdG/ugNT31WusS9b/GMC74wLIBrY58YBxIxHWACWjh5rQ HQjsb7gOSuuWKlFsFt3DodjUkbDHmsdKAw72DwjDgX4FY8Fc5yKuPqC+suCYxULOlOlJ SqVn6vVv4RP4M+tlTQmyAaP8gobMezXlu+G1vgx+vbu7VnZPs2LGicVRz+CbPFPmJhNF ZODg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KnNVQ9u0IYWwSGYMFLkpMX80FRfkixGHmPuZPPAEFoc=; b=LmKgH92YDhHsbRLgzFM/3jty1+pb/895GISCnQeLNAvbc7WpSy2imWFIiXJDXNYxSk kYiwcTWzhF0d6t0UGIRD0baCAYnb+kRofvtlpceQI7fXuBIaRPLKMJTnReMEKtvLFjNs YNp1mwi6aKKoG/7i92lIs3i5xcOnuioY0ZmP8wwKE6l/StplX6BJnWeBaLvKeTUkvvrj hOyJRn5k9STh8kH6wMgB68OwmdLVG13Z/UaFJNb9X0akInmOWw3xiw4cIasDqFj7JwbU Zi6R8MGZoNh1yJnuAv2UTcspGwVfNSNzZTcjDqxcIAIt9jcttuY54c1XFR5ghSOxXIx+ D4sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mKA+9kXX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u185si18008717pgd.561.2019.07.08.15.37.03; Mon, 08 Jul 2019 15:37:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mKA+9kXX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388688AbfGHPZw (ORCPT + 99 others); Mon, 8 Jul 2019 11:25:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388667AbfGHPZr (ORCPT ); Mon, 8 Jul 2019 11:25:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D67B62166E; Mon, 8 Jul 2019 15:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599546; bh=lILbjS1MfLSQF9cZm/MWdMJLBOHiKCzQiSBXSvNAmBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mKA+9kXXKZ8awfhAfn81ajgitkhlQlMVVLKeucdyKIRbl3Qk66reqCGbBYd5Nk82P PoEhTYe6vVq0IylyU0uT5R3ctDOxE4UFftteM9pKWNmdXuynmh9m8dyS2vHdKpdOXx mKFGVqLg+/AybpcYNjvL0Rd7jdaOfP8WPDyNhgKw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+c03f30b4f4c46bdf8575@syzkaller.appspotmail.com, Alexander Potapenko , Paolo Bonzini Subject: [PATCH 4.14 50/56] KVM: x86: degrade WARN to pr_warn_ratelimited Date: Mon, 8 Jul 2019 17:13:42 +0200 Message-Id: <20190708150524.041316708@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150514.376317156@linuxfoundation.org> References: <20190708150514.376317156@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 @@ -1392,7 +1392,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; } } @@ -1402,8 +1402,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; }