Received: by 10.223.185.116 with SMTP id b49csp1014906wrg; Wed, 21 Feb 2018 10:35:30 -0800 (PST) X-Google-Smtp-Source: AH8x226dHWQzD3wkw5nuqs9Qrg9y+OX8xf54uFEgJulRaFk+YRoq3oTVLqg2aFvwdZOUhd7sv2Up X-Received: by 10.99.156.17 with SMTP id f17mr3501195pge.12.1519238130150; Wed, 21 Feb 2018 10:35:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238130; cv=none; d=google.com; s=arc-20160816; b=YweeZv87jhRZQlH6jlGGJCnGjm9jExzkdw6fP1MJM1RpKQSfemSX5uIDChwC/YpGGm Ng0AAUfsd5ptfe4zJO20TtjWfiheaJoYqS9WAAe48KSak6eODQEc4R8JP5LfQhj3j4PI EBwclrlI1jfzYSQ5r2YzC9VusZqVhcZaVoE5l/wVZaiDp+20O0dD8NYqw2bAnsG/L/A3 2N7CyLK8GNaG8w476y4AAzE4rbJXr5/CalG5xRWOhFhZm9fXGpVll9hr9qNvuAOvgGXC FDge377CNqpBusw0cEuS6Tc6Uaiwd3AvxXH75nGvWTpHj4ahqrSHcjPpJd3qpcNP1iIq LVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=4urOZxobNegxTUhbP5k6JntUBgFibsBvM/pEofQnb1A=; b=Sm7AsL95Mm1kgLzSjIaklAJAJhxmGW/bgzpSYOwTkMTeSHOSDUoA0Zb6IQcY8SvUen RSNkY8j1zX8YdnvyLDLhv/y2BSLwvIabL/VcDiSGQ2oHL5qhnLqzAQtochhkekt2STbV BfKHCTgujBkhziV5wPtjJhnpwsNf2lThBGDBYYPXz40r1IZX08xs1PTO9+J6+guK/0vE 7dwx8eeyH8Mbx+aROV1GJAHfaAJa71g0iHlzDm3OD+U1lDV0eMWCJW6efPJNqNLy24vc Rd1FxAYakl26BCBqDZBMvVvzlflEwq33wPXhVoW98JC9nLxlv9zwOQyMttognPIOoRIb 3yLA== ARC-Authentication-Results: i=1; mx.google.com; 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 y7si262172pgv.128.2018.02.21.10.35.15; Wed, 21 Feb 2018 10:35:30 -0800 (PST) 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; 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 S965449AbeBUNJf (ORCPT + 99 others); Wed, 21 Feb 2018 08:09:35 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43002 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965416AbeBUNJ3 (ORCPT ); Wed, 21 Feb 2018 08:09:29 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 972F711DA; Wed, 21 Feb 2018 13:09:28 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Andy Lutomirski , Borislav Petkov , David Woodhouse , KarimAllah Ahmed , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , kernel-janitors@vger.kernel.org, Ingo Molnar Subject: [PATCH 4.15 085/163] x86/spectre: Fix an error message Date: Wed, 21 Feb 2018 13:48:34 +0100 Message-Id: <20180221124535.102667182@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit 9de29eac8d2189424d81c0d840cd0469aa3d41c8 upstream. If i == ARRAY_SIZE(mitigation_options) then we accidentally print garbage from one space beyond the end of the mitigation_options[] array. Signed-off-by: Dan Carpenter Cc: Andy Lutomirski Cc: Borislav Petkov Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: KarimAllah Ahmed Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: 9005c6834c0f ("x86/spectre: Simplify spectre_v2 command line parsing") Link: http://lkml.kernel.org/r/20180214071416.GA26677@mwanda Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -174,7 +174,7 @@ static enum spectre_v2_mitigation_cmd __ } if (i >= ARRAY_SIZE(mitigation_options)) { - pr_err("unknown option (%s). Switching to AUTO select\n", mitigation_options[i].option); + pr_err("unknown option (%s). Switching to AUTO select\n", arg); return SPECTRE_V2_CMD_AUTO; } }