Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10536484ybi; Thu, 25 Jul 2019 01:05:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9J7pxEFLRSe+rHmUrhgpoT/u2Y6dPVp/ssqN3k5uOEhBYYR3fcGpdTDyvtpKXzKDdlIgW X-Received: by 2002:a63:6fcf:: with SMTP id k198mr84184488pgc.276.1564041930390; Thu, 25 Jul 2019 01:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564041930; cv=none; d=google.com; s=arc-20160816; b=GMRkT1xqx9jwArOfycoC25Z0Qf9SzE7xRsMXxK/pAiCw/e2iv7yvDuYmCbiZK/E07q 1CgvSQNZAY2gQgtKnYht2q9/3+5jmt+XGcKqJz+QEJgGAWS40nO2LBe35qZouoIiy1IQ LiS9N5LAa/w9cn19XEn9hRPPhJeBZ85eX1VPL/nZsYoYYHzh62zchGw9P0E5ix0TA7Ve flW0FKNUri4242erl8jMWHuad8pPfHZhfUq98Oz0KmO9GRNBCRnZqMxYCktjOdgZD7x0 64d+ogzuT/BTK/gy4FplkQ0ZpiLgvaB04INU28DTfpaA5wZf2gT/Rk1y1BLPDEonB2DK 4SIw== 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=g58cdiec0LqRRPW37uRBMmhKwEv3uvZiLG67So05hhZmtFvjb0EAchWLetpqR3mOZs NpBcJONKRzdYdAUqXiLQrfj+WwVjzKLhlntltmVzsmn/eiBrBB9IU0Vc+qrlVEeadMUH 1aAtNg0XvQSUdRSHYmJ7F1oiW0/XbsJhnpWHx+PuCSgUrKrMsYM7G9ed/ZrZ+LZhAbII ELktFi1oMozc1JO56xcDD1HFxaFL8ARAd1q4lfOl7+EnEUJFaMFiKU/t406SOGYJ4UkC sFcFpUTJw04a3gUtA43pq1Mf1Uiux7vlEhlWpmqun6zQDihHWL6NxQ177m8b8ngPnwnF pKZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YxgZBWhY; 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 p11si18697737pgk.223.2019.07.25.01.04.48; Thu, 25 Jul 2019 01:05: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=YxgZBWhY; 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 S2391492AbfGXURz (ORCPT + 99 others); Wed, 24 Jul 2019 16:17:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:58144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403799AbfGXTts (ORCPT ); Wed, 24 Jul 2019 15:49:48 -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 A002F205C9; Wed, 24 Jul 2019 19:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997787; bh=w4us00/9sn9R8EktR5DtQjHif2aVMiSmqh/+yBf/PJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YxgZBWhYW61JC4u7gQHxSPqWCAwJ5nBSSaky0Bl9/5PKRC9debMtnZb2cGQixGtbH wad5QqLnNXx+j671BA5rscSgmbVsnBG/t+wDi+heIypiAH6co41IZoizQxyxqXpQ9H QQyVYhS5SskPauDbLIPoZCEI5VdPjuYn4GkJvKpc= 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 5.1 143/371] x86/build: Add set -e to mkcapflags.sh to delete broken capflags.c Date: Wed, 24 Jul 2019 21:18:15 +0200 Message-Id: <20190724191735.801450037@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@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