Received: by 10.223.185.111 with SMTP id b44csp917148wrg; Fri, 9 Mar 2018 16:48:58 -0800 (PST) X-Google-Smtp-Source: AG47ELu3nkOQ7yU9JwvTjtXSm2Drf2TbhepMUqIyDBRuaDNURtuyhKvj/j8umYoFenIoUqoxMfFM X-Received: by 10.99.172.66 with SMTP id z2mr298872pgn.273.1520642937946; Fri, 09 Mar 2018 16:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520642937; cv=none; d=google.com; s=arc-20160816; b=YBCwPMsdBQRYGB1pfmyh3gweNwXHXxHrmxVy6K/U1wAeyMg4FN+KFdz+Yy/ZNsNR8+ ZZophZIwwyzr16gZssta/wmj7ziAj2lOCVf/x9skJkZbw7YYsVTpuBaIN/9yTcU1SGPH X4QBa0xJvty/k4YmILkqbQWQRim/Yn0vSdwXKbEra1+zY14Ko4xiUUC0nUzRkMYJ6qBn EZvkC04MfFnoT0ejc0Rdyq+JeUp95v24VPJO8S0626OpNI5ocIvflqx8JTH3ayTDHoDd GXBFPBtukuNIS1BuoejHIfKqtbOkZW3ln+eO9DlHiAG862lUAWXfBX48PknbKexknmir dbcQ== 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=gxSnFuPvqWbtWXTiSmt+Jg3GImSMHSkMFaX5wwcf2hI=; b=N1fEf5BsYY54T9NFJAjrs4+bfoIoZVytTzkRaYfybMKbWjFD7ECjwQEapnxZM6G+F0 2oiDE2rSzYbZY0iv4HmamhjR6MSszwIulT/1YpqQoW96LRpxNWGuX7SXPodmH81L5wTB H4TqOpK6x46noP9D4oY5Im2zuef4bcRL+VSd45f7JqSDQ/URZcKI3w7+RwdYztlIu3qy evdMf4/t3HrZ4A2cbjujAhc80WnN5Za3IhAJrQP3+h47D/EGaCvHeFY08vym20yDspnl TlWLRSBxu/JmimDnztCSVj4P1IqkzLiInjIqEmKh7bcuO3yORoi5hgibe5kXzzZAfvUw 57cA== 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 l3si1761688pfb.377.2018.03.09.16.48.43; Fri, 09 Mar 2018 16:48:57 -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 S933342AbeCJAr4 (ORCPT + 99 others); Fri, 9 Mar 2018 19:47:56 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38880 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933173AbeCJATw (ORCPT ); Fri, 9 Mar 2018 19:19:52 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 51256F89; Sat, 10 Mar 2018 00:19:51 +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 , Ben Hutchings Subject: [PATCH 4.4 16/36] x86/spectre: Fix an error message Date: Fri, 9 Mar 2018 16:18:32 -0800 Message-Id: <20180310001808.223312534@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180310001807.213987241@linuxfoundation.org> References: <20180310001807.213987241@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.4-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 Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -175,8 +175,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; } }