]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: mark prepare0 as PHONY to fix external module build
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 15 Jan 2019 07:19:00 +0000 (16:19 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 17 Jan 2019 14:42:59 +0000 (23:42 +0900)
commit3cf05299e419b06ebd4428b9a00adfb1adccdd91
treee7d13aaacfd69171f1265b30d2edaf428da875c0
parent66c3c2faf1e14877a1c4f6c4ac35009d2edf5508
kbuild: mark prepare0 as PHONY to fix external module build

Commit cdc2f167dc52 ("powerpc/32: add stack protector support")
caused kernel panic on PowerPC when an external module is used with
CONFIG_STACKPROTECTOR because the 'prepare' target was not executed
for the external module build.

Commit 71e9509814bd ("kbuild: fix single target build for external
module") turned it into a build error because the 'prepare' target is
now executed but the 'prepare0' target is missing for the external
module build.

External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is
also broken in the same way.

Move 'PHONY += prepare0' to the common place. GNU Make is fine with
missing rule for phony targets. I also removed the comment which is
wrong irrespective of this commit.

I minimize the change so it can be easily backported to 4.20.x

To fix v4.20, please backport 71e9509814bd ("kbuild: fix single target
build for external module"), and then this commit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=201891
Fixes: 71e9509814bd ("kbuild: fix single target build for external module")
Fixes: cdc2f167dc52 ("powerpc/32: add stack protector support")
Fixes: 5d7d6cc56d7f ("ARM: smp: add support for per-task stack canaries")
Fixes: 0eeffd025f9a ("arm64: enable per-task stack canaries")
Cc: linux-stable <stable@vger.kernel.org> # v4.20
Reported-by: Samuel Holland <samuel@sholland.org>
Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Makefile