]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2016 16:39:57 +0000 (18:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2016 16:39:57 +0000 (18:39 +0200)
added patches:
arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch

queue-4.4/arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch b/queue-4.4/arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch
new file mode 100644 (file)
index 0000000..ee5c659
--- /dev/null
@@ -0,0 +1,43 @@
+From 9113c2aa05e9848cd4f1154abee17d4f265f012d Mon Sep 17 00:00:00 2001
+From: Suzuki K Poulose <suzuki.poulose@arm.com>
+Date: Thu, 21 Jul 2016 11:12:55 +0100
+Subject: arm64: Fix incorrect per-cpu usage for boot CPU
+
+From: Suzuki K Poulose <suzuki.poulose@arm.com>
+
+commit 9113c2aa05e9848cd4f1154abee17d4f265f012d upstream.
+
+In smp_prepare_boot_cpu(), we invoke cpuinfo_store_boot_cpu to  store
+the cpuinfo in a per-cpu ptr, before initialising the per-cpu offset for
+the boot CPU. This patch reorders the sequence to make sure we initialise
+the per-cpu offset before accessing the per-cpu area.
+
+Commit 4b998ff1885eec ("arm64: Delay cpuinfo_store_boot_cpu") fixed the
+issue where we modified the per-cpu area even before the kernel initialises
+the per-cpu areas, but failed to wait until the boot cpu updated it's
+offset.
+
+Fixes: 4b998ff1885e ("arm64: Delay cpuinfo_store_boot_cpu")
+Cc: <stable@vger.kernel.org> # 4.4+
+Cc: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
+Acked-by: Mark Rutland <mark.rutland@arm.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/kernel/smp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/smp.c
++++ b/arch/arm64/kernel/smp.c
+@@ -333,8 +333,8 @@ void __init smp_cpus_done(unsigned int m
+ void __init smp_prepare_boot_cpu(void)
+ {
+-      cpuinfo_store_boot_cpu();
+       set_my_cpu_offset(per_cpu_offset(smp_processor_id()));
++      cpuinfo_store_boot_cpu();
+ }
+ static u64 __init of_get_cpu_mpidr(struct device_node *dn)
index 5b3865dee3054c3657eabfe834547bf2aad501bb..db8b2614a65c324552c403696c5b2b095addc9bd 100644 (file)
@@ -8,3 +8,4 @@ usb-renesas_usbhs-fix-null-pointer-dereference-in-xfer_work.patch
 usb-usbfs-fix-potential-infoleak-in-devio.patch
 arm64-kernel-save-and-restore-uao-and-addr_limit-on-exception-entry.patch
 arm64-debug-unmask-pstate.d-earlier.patch
+arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch