Received: by 10.223.185.116 with SMTP id b49csp972578wrg; Wed, 21 Feb 2018 09:54:38 -0800 (PST) X-Google-Smtp-Source: AH8x224xEijtMlOaC2ArWnhnaNN4lxAbdi6tJYniwiAUuFkbX4tIbbkNKpck6MU0LOgBY/O5Vsi/ X-Received: by 2002:a17:902:8a91:: with SMTP id p17-v6mr3810296plo.375.1519235678819; Wed, 21 Feb 2018 09:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519235678; cv=none; d=google.com; s=arc-20160816; b=d+xyb4CNhqQ/GVgNk//IZ3RhYMWPOtb6zdaon8D0oydQoKqO2hJ1ls8y5i8ctGRtFr CV8QkF819txlf0d5vlk1AwZBtsJbK4NjJA8spEt5U9ONUDyfcmJN550t0GAZwqKnIOic RZipxihvaPrMmpNfiTG2VDj9/S1ME8gJvO2eQSMCsoCdsEM00nNNHYOBWiUwrK6o3A3I Vq14gzFikhTimi001Rqtxsvx6KRuNOPdN+i6i52fRvP+yiPNt9YbJQBTKsJt0zdj2nxA FYGKnhbjTw/aXZ2U5tAx1yxDz7CnE0k5uQjTRoqz1SbYAr9MA8waXZMPuY8tg5yp0DQr Ln2Q== 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=hTd2SkcZfUbYvMxoxZ96XQdbKR63JPzdBYXQ4WpJCcE=; b=vma5tAWGIzZNvYmOiI2m4WvtfHmLLjJVN0da4cAoM2eHlbOpZUtjNrzw0ralNM6xuJ 4h8B99C5DY2/UEb7crrlT/u46DmO2R1iRPAl5D8qSM2TVXFRcslq8nMRlbPDIIZHHt6f HckplPooxCUYRSOy8ELybdAqqWcJcyeYPNK8nTvvhTLYUDu+PJbWq49qNu+z5Q4BIASo fzeBcdTOcJaZRa8X9ycFp2VTsc5edaH/iZiIg1uApalszBtVPi3taCAZXZxVXGPpXHMI p88Sae8UTzqHSKYXU44oIDnq/yrLEYk7B8a+Xd05F2MoGaVM8NFLEF73VxYqy086VMeE 233w== 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 h6-v6si12606492pll.168.2018.02.21.09.54.24; Wed, 21 Feb 2018 09:54:38 -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 S934567AbeBUM47 (ORCPT + 99 others); Wed, 21 Feb 2018 07:56:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35614 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934545AbeBUM44 (ORCPT ); Wed, 21 Feb 2018 07:56:56 -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 D543594F; Wed, 21 Feb 2018 12:56:54 +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.9 65/77] x86/spectre: Fix an error message Date: Wed, 21 Feb 2018 13:49:14 +0100 Message-Id: <20180221124434.946852327@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@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.9-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 @@ -173,7 +173,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; } }