]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 05:44:15 +0000 (07:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 05:44:15 +0000 (07:44 +0200)
added patches:
x86-init-fix-build-with-config_swap-n.patch

queue-4.4/series
queue-4.4/x86-init-fix-build-with-config_swap-n.patch [new file with mode: 0644]

index bba71f5293a0006cb0c8c24c3b84fcc52229c508..13d31d8eb2005854960f8f33c12bfa8ef9f8d065 100644 (file)
@@ -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 (file)
index 0000000..d4e8c8d
--- /dev/null
@@ -0,0 +1,40 @@
+From 792adb90fa724ce07c0171cbc96b9215af4b1045 Mon Sep 17 00:00:00 2001
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 14 Aug 2018 20:50:47 +0200
+Subject: x86/init: fix build with CONFIG_SWAP=n
+
+From: Vlastimil Babka <vbabka@suse.cz>
+
+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 <pruzinat@gmail.com>
+Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2")
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Cc: stable@vger.kernel.org
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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