Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757834AbcJQHzh (ORCPT ); Mon, 17 Oct 2016 03:55:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:47057 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757596AbcJQHzU (ORCPT ); Mon, 17 Oct 2016 03:55:20 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Jarzmik , Michal Marek , Jiri Slaby Subject: [PATCH 3.12 08/84] kbuild: forbid kernel directory to contain spaces and colons Date: Mon, 17 Oct 2016 09:50:55 +0200 Message-Id: <941646b92f425a42c5fea6f1290f81471fa8acfa.1476690493.git.jslaby@suse.cz> X-Mailer: git-send-email 2.10.1 In-Reply-To: <2d291fde5f706ac081e8cfc0ebe7e31dd534dfe7.1476690493.git.jslaby@suse.cz> References: <2d291fde5f706ac081e8cfc0ebe7e31dd534dfe7.1476690493.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 41 From: Robert Jarzmik 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 51193b76bfff5027cf96ba63effae808ad67cca7 upstream. When the kernel path contains a space or a colon somewhere in the path name, the modules_install target doesn't work anymore, as the path names are not enclosed in double quotes. It is also supposed that and O= build will suffer from the same weakness as modules_install. Instead of checking and improving kbuild to resist to directories including these characters, error out early to prevent any build if the kernel's main directory contains a space. Signed-off-by: Robert Jarzmik Signed-off-by: Michal Marek Signed-off-by: Jiri Slaby --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0b3a710c8a44..297c605c25bf 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,10 @@ _all: # Cancel implicit rules on top Makefile $(CURDIR)/Makefile Makefile: ; +ifneq ($(words $(subst :, ,$(CURDIR))), 1) + $(error main directory cannot contain spaces nor colons) +endif + ifneq ($(KBUILD_OUTPUT),) # Invoke a second make in the output directory, passing relevant variables # check that the output directory actually exists -- 2.10.1