Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10421764ybi; Wed, 24 Jul 2019 22:56:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkLTTH3TQ2c8XOurMMupPCqJo7Kc65K+zIQfguNU5osNhtqJ8410wYlEf+L90UG9LqMO17 X-Received: by 2002:aa7:9092:: with SMTP id i18mr14844118pfa.101.1564034190026; Wed, 24 Jul 2019 22:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034190; cv=none; d=google.com; s=arc-20160816; b=KvvwkkOMl1r8kBWqc5jrwzOlLuP4vyzokoiCW5+bp+Ihahot1W8D3ok6LgXsFRkx4w 7aWjEuN0anaTs+7gF0fbqRl8jlN3SBaB7mC96JbASYvsUBLMGeg+LR5t/QSgk1fHWCh4 tu09yXyzlcXZHjSWWrEfErtkzo19JtZ/zwDf1yy8oSao8e+rgD5eEMauQzaoCCnOBsNS QKHaweGlCWIeJhjVDTR76MQ3BfdZhpZ0HE0I2mhwqpmvPg6NdDeAlG7AO3eO6TIp5sBR teu4pSogFe6ikidXNDraMp6Kt344yHZAyJlOBeePjeYmuNjn1krik8EXeGbFc7yCGrtu zoew== 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=hoXpDidqFCnXinn+zA8e6UNucsDtFXXc/UkRlQVNzmk=; b=V10/IP/FAsKac/IFjPKq6DQyoWZgIc3UTdfsKFvkyAhL7HIhtr5Y1vagPBb0hERFXG Jk2CyiWMtVhV4Tahk7+CGxcgLD1QYAh5A3C28bPnqPQQEnXa8NFRX4VTBc84hBnSCaG1 ys3F6OHteIvk99C1jqqvluY4XRb+vTBMUoygEUq7QfMx8sHpD+tymVNd4E1/EWlYHA// Roy8xkZmeiEIm96+r73cdkumaKkHkvOu+wrH9MfcLL6OJNJPVKNS0FZ1WV9y1UkFhzhm dN/Dwbah41LH8vvPQ9+9wHT3i1aXWmdbU8uQVir+PDATR9rThZI8nTrXavJcopIRlHt+ NkXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b029vZod; 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 b32si3843097pla.277.2019.07.24.22.56.15; Wed, 24 Jul 2019 22:56:30 -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=b029vZod; 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 S2403976AbfGYFjI (ORCPT + 99 others); Thu, 25 Jul 2019 01:39:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:53210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390711AbfGYFjE (ORCPT ); Thu, 25 Jul 2019 01:39:04 -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 4D7CA22BEB; Thu, 25 Jul 2019 05:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033143; bh=w4us00/9sn9R8EktR5DtQjHif2aVMiSmqh/+yBf/PJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b029vZod3uhea48W3YnVmeW9DpaUXry3ImwzceEgHVeWRr+C+Y4VMNMLEB7PM8qSp Ot3A/KmuzUcdSCN31QDzuv12Y1EBzl/gv+sFU+d8YWE7kJFVh4yieYjaXy28R3eJTD Wz0biX+raRHEElmjtvE7p501HgeWha97Oe65DzBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov , Sasha Levin Subject: [PATCH 4.19 107/271] x86/build: Add set -e to mkcapflags.sh to delete broken capflags.c Date: Wed, 24 Jul 2019 21:19:36 +0200 Message-Id: <20190724191704.370118560@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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 [ Upstream commit bc53d3d777f81385c1bb08b07bd1c06450ecc2c1 ] Without 'set -e', shell scripts continue running even after any error occurs. The missed 'set -e' is a typical bug in shell scripting. For example, when a disk space shortage occurs while this script is running, it actually ends up with generating a truncated capflags.c. Yet, mkcapflags.sh continues running and exits with 0. So, the build system assumes it has succeeded. It will not be re-generated in the next invocation of Make since its timestamp is newer than that of any of the source files. Add 'set -e' so that any error in this script is caught and propagated to the build system. Since 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"), make automatically deletes the target on any failure. So, the broken capflags.c will be deleted automatically. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20190625072622.17679-1-yamada.masahiro@socionext.com Signed-off-by: Sasha Levin --- arch/x86/kernel/cpu/mkcapflags.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/cpu/mkcapflags.sh b/arch/x86/kernel/cpu/mkcapflags.sh index d0dfb892c72f..aed45b8895d5 100644 --- a/arch/x86/kernel/cpu/mkcapflags.sh +++ b/arch/x86/kernel/cpu/mkcapflags.sh @@ -4,6 +4,8 @@ # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h # +set -e + IN=$1 OUT=$2 -- 2.20.1