From: Greg Kroah-Hartman Date: Wed, 15 Aug 2018 05:44:15 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.18.1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=314b10be6da9985d430c3d5497da596694d28b68;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: x86-init-fix-build-with-config_swap-n.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index bba71f5293a..13d31d8eb20 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -41,3 +41,4 @@ x86-speculation-l1tf-make-pmd-pud_mknotpresent-invert.patch x86-mm-pat-make-set_memory_np-l1tf-safe.patch x86-mm-kmmio-make-the-tracer-robust-against-l1tf.patch x86-speculation-l1tf-fix-up-cpu-feature-flags.patch +x86-init-fix-build-with-config_swap-n.patch diff --git a/queue-4.4/x86-init-fix-build-with-config_swap-n.patch b/queue-4.4/x86-init-fix-build-with-config_swap-n.patch new file mode 100644 index 00000000000..d4e8c8d3ca4 --- /dev/null +++ b/queue-4.4/x86-init-fix-build-with-config_swap-n.patch @@ -0,0 +1,40 @@ +From 792adb90fa724ce07c0171cbc96b9215af4b1045 Mon Sep 17 00:00:00 2001 +From: Vlastimil Babka +Date: Tue, 14 Aug 2018 20:50:47 +0200 +Subject: x86/init: fix build with CONFIG_SWAP=n + +From: Vlastimil Babka + +commit 792adb90fa724ce07c0171cbc96b9215af4b1045 upstream. + +The introduction of generic_max_swapfile_size and arch-specific versions has +broken linking on x86 with CONFIG_SWAP=n due to undefined reference to +'generic_max_swapfile_size'. Fix it by compiling the x86-specific +max_swapfile_size() only with CONFIG_SWAP=y. + +Reported-by: Tomas Pruzina +Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2") +Signed-off-by: Vlastimil Babka +Cc: stable@vger.kernel.org +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/mm/init.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/x86/mm/init.c ++++ b/arch/x86/mm/init.c +@@ -770,6 +770,7 @@ void update_cache_mode_entry(unsigned en + __pte2cachemode_tbl[entry] = cache; + } + ++#ifdef CONFIG_SWAP + unsigned long max_swapfile_size(void) + { + unsigned long pages; +@@ -790,3 +791,4 @@ unsigned long max_swapfile_size(void) + } + return pages; + } ++#endif