Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1006609ybi; Fri, 2 Aug 2019 07:52:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+DXs1OoHQJhQf/qVXwxohtLUFZOnLR9p3IQ3gYOJnlB3PykWrBTPEaWNIYFTMnVpFoDsI X-Received: by 2002:a63:194f:: with SMTP id 15mr90929266pgz.382.1564757521691; Fri, 02 Aug 2019 07:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564757521; cv=none; d=google.com; s=arc-20160816; b=GepgrIiQpOQ8H14lYv6Stg1ReEelD0gNlwyKKC3RjKjFgrYFPCJ+oU6hPy4giNg5oA kcbyffpWGHY5sveJZMj5mgxCIxUDO9a/JDOyw36C9lVhYtJmHTalNVkItUPWqzzxZ8bB 90RWqA3Ml30md0qtCrBjXejU65be0ylbcGBxpyx1B0ggH1lpZxkVf1pg4yVqfuiJ2vgH HPyuI1IonuZpVyb9AtvxELq2oNBtb5k0KVQNOjfZbICudNmkhdaUXuGyoLjQYYZrWrx+ MmSMEcdwOcrZUYKPiXXbdxLcdEdkG1cDq6lw9HBJ1M5wmfcnVAysKkr4/x6y+V+7qmdi NqeQ== 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=4qXvvZZTxanzp2jMLvzyjor60v6eKLTSkJjtysBM/Ds=; b=aBjoGINdj5nY4pUoS4idht6MQ3iMMykS5039W+jaf2G/yGXZBoeCn4UCto4Q3yuO9Q IEcZqWrF55O79PCVv5bb4ZjgjxpOM1854A70SXelgQY3NGMyrsH2r5cb6y1jQZq9NeGI 9pUamdZ3S21kFFohkP8a4OqqrmSEr8lRSYuWK9L9D4dE6MRQgJ05cVG0lMgls78xJC2Y YVHaU5s0Gwr4PIaJMNYkFIPkhJvEOv7KfGjKl/iqm5cv/9ceuoFdn8zIzsUv9lmRQE2y oMvYGSDSq5tPZxNxKRy13+0uWjjvlbMkH48DiISkvuD3xjYfAfknRASSjBur+4PZXkSW 8Ypw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R+sRsRT6; 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 p23si8523726pgi.76.2019.08.02.07.51.46; Fri, 02 Aug 2019 07:52:01 -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=R+sRsRT6; 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 S2389792AbfHBJb1 (ORCPT + 99 others); Fri, 2 Aug 2019 05:31:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391072AbfHBJbX (ORCPT ); Fri, 2 Aug 2019 05:31:23 -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 EB96021783; Fri, 2 Aug 2019 09:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738282; bh=FjKxljAzNCZ8/Q1mr/jvpiOJoPO07xVhPRPdIySrwUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+sRsRT6X2CMeLrewzrIWUajIJdhCA2z4xqpFm6/BHm0dr2XXOjj/FfPu2g+ZyOxH fGLuzjYef6ImWJkA7SjlD0NovziYK/PmM0VELAXIHrTIQQ69Z7rHxLMCUk4AmasaqP lrOwC6ppReZ1QADoibAMiX3YJsJ1TcjorbRaCulo= 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.4 043/158] x86/build: Add set -e to mkcapflags.sh to delete broken capflags.c Date: Fri, 2 Aug 2019 11:27:44 +0200 Message-Id: <20190802092212.801903202@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@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 6988c74409a8..711b74e0e623 100644 --- a/arch/x86/kernel/cpu/mkcapflags.sh +++ b/arch/x86/kernel/cpu/mkcapflags.sh @@ -3,6 +3,8 @@ # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h # +set -e + IN=$1 OUT=$2 -- 2.20.1