From 973cf603353b04e2e7906a877db2b27ce61bc0a2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 2 Feb 2024 16:52:21 -0800 Subject: [PATCH] 5.15-stable patches added patches: arm64-irq-set-the-correct-node-for-shadow-call-stack.patch --- ...e-correct-node-for-shadow-call-stack.patch | 38 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 queue-5.15/arm64-irq-set-the-correct-node-for-shadow-call-stack.patch diff --git a/queue-5.15/arm64-irq-set-the-correct-node-for-shadow-call-stack.patch b/queue-5.15/arm64-irq-set-the-correct-node-for-shadow-call-stack.patch new file mode 100644 index 00000000000..460796e5379 --- /dev/null +++ b/queue-5.15/arm64-irq-set-the-correct-node-for-shadow-call-stack.patch @@ -0,0 +1,38 @@ +From 7b1a09e44dc64f4f5930659b6d14a27183c00705 Mon Sep 17 00:00:00 2001 +From: Huang Shijie +Date: Wed, 13 Dec 2023 09:20:46 +0800 +Subject: arm64: irq: set the correct node for shadow call stack + +From: Huang Shijie + +commit 7b1a09e44dc64f4f5930659b6d14a27183c00705 upstream. + +The init_irq_stacks() has been changed to use the correct node: +https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=75b5e0bf90bf + +The init_irq_scs() has the same issue with init_irq_stacks(): + cpu_to_node() is not initialized yet, it does not work. + +This patch uses early_cpu_to_node() to set the init_irq_scs() +with the correct node. + +Signed-off-by: Huang Shijie +Reviewed-by: Catalin Marinas +Link: https://lore.kernel.org/r/20231213012046.12014-1-shijie@os.amperecomputing.com +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/kernel/irq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/kernel/irq.c ++++ b/arch/arm64/kernel/irq.c +@@ -45,7 +45,7 @@ static void init_irq_scs(void) + + for_each_possible_cpu(cpu) + per_cpu(irq_shadow_call_stack_ptr, cpu) = +- scs_alloc(cpu_to_node(cpu)); ++ scs_alloc(early_cpu_to_node(cpu)); + } + + #ifdef CONFIG_VMAP_STACK diff --git a/queue-5.15/series b/queue-5.15/series index ff0fbad4fe2..660b3f928cf 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -293,3 +293,4 @@ net-ipv4-fix-a-memleak-in-ip_setup_cork.patch af_unix-fix-lockdep-positive-in-sk_diag_dump_icons.patch selftests-net-fix-available-tunnels-detection.patch net-sysfs-fix-sys-class-net-iface-path.patch +arm64-irq-set-the-correct-node-for-shadow-call-stack.patch -- 2.47.3