Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7150338ybi; Mon, 8 Jul 2019 15:39:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDzYuhqoyx6NlVz04OimNIGKZILSrnU+TkQlTAQMCabybim19B5bb3um0782SWiXmOlloZ X-Received: by 2002:a17:902:6a2:: with SMTP id 31mr26526182plh.296.1562625568923; Mon, 08 Jul 2019 15:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625568; cv=none; d=google.com; s=arc-20160816; b=k2OGkqqTaNpOF/LXRARYzuW+GFENRjmwL4gGLDPsUe5BIZlVFnXg75ToJFHA7i8j1+ QZkypE9eZv9gKH3+LviTEOigTANIYHvzhqNfVrrgyDMcMoeGTSrRKsCn1BWL1ynr2hWk W7/vdLCowMGPgBzGHweBVSm0UAXLYMfMpxIXao4chyfOU6LtFwNEZxva5/7QfKNpV9Gf xY/uWMcOEPRycOVAx1h9dJYyWYls7a5cvTJGAvnnKlpDIkNvRmNGY4bE9ClvLdbST1mp qAP63FvqBDvKfS4H/yugFt9eef+CC7gsqZoPUhmuxXZSxdoUzqkH0FMQpVWO4mTjXc2y aJ+A== 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=a3RXW1P+YJj+MZU7m3Zg8N0e2qnZsXfUE4q3Ip184+c=; b=ljMoREG7GdOsrDIAmwh1XASBsiZXQWZegys914paEqfDkXXYC/1stE61Df7vYVi3wk iRCTG32/WzD/w9Vg1lfdTPqmgAXvQzh9uWp5YeMAWi0d0T/p6phOhnNWz54rByRZhyJC y9VDoTgTeNWtyLYOTHSRPkDutWRC4c4wTpmHbGX+Hddmw2Gr5P+P2G43cPMZ33bMPkQa o9NawUO66/9lI70Sx8AJWsDrHmPZfdHvBziFLWnhesdytvSCK73WubQPwblV8xrkzReV Rfa4HPJBCayUt5MKOpXfPZ8/TxgNSv6YQ5Yq2nLySx9ArAVGlR/iSVNcE4eSY8kK0jkN g7jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="1wXTDn/4"; 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 77si21779762pge.315.2019.07.08.15.39.13; Mon, 08 Jul 2019 15:39:28 -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="1wXTDn/4"; 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 S2389820AbfGHPaK (ORCPT + 99 others); Mon, 8 Jul 2019 11:30:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:58982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728167AbfGHPaC (ORCPT ); Mon, 8 Jul 2019 11:30:02 -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 5BE4F20645; Mon, 8 Jul 2019 15:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599801; bh=h/g+fnyqelDIBef6lZ+o2cuNEp5nnEToVRY3PLkrDnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1wXTDn/4x8odbEdu1cd0cOqflBHrt9PsRD/Ivu2nOdhTHYCxXHKtKQc3g6IDW3MR6 DLnujIMJUJZY2OEOqTuYIr9LysO+69eBb5g9LQrnBMMz+YVl6yjpTV2oJFLUdBbs4B 02Z5DbtdtI7VPpkD5xSqXU5OmyGimblljI3w5pgs= 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.19 82/90] KVM: x86: degrade WARN to pr_warn_ratelimited Date: Mon, 8 Jul 2019 17:13:49 +0200 Message-Id: <20190708150526.553674137@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@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 @@ -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; }