summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorConor Dooley <conor.dooley@microchip.com>2023-02-10 18:59:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-10 09:40:12 +0100
commit59b83f7b057dd6aa90bd97d90d78135fb72b9b47 (patch)
treebf335b3a26b7e29cd2466edc6830675f1de448c2 /arch
parent0595cdb587726b4f0fa780eb7462e3679d141e82 (diff)
downloadlinux-59b83f7b057dd6aa90bd97d90d78135fb72b9b47.tar.gz
linux-59b83f7b057dd6aa90bd97d90d78135fb72b9b47.tar.bz2
linux-59b83f7b057dd6aa90bd97d90d78135fb72b9b47.zip
RISC-V: add a spin_shadow_stack declaration
commit eb9be8310c58c166f9fae3b71c0ad9d6741b4897 upstream. The patchwork automation reported a sparse complaint that spin_shadow_stack was not declared and should be static: ../arch/riscv/kernel/traps.c:335:15: warning: symbol 'spin_shadow_stack' was not declared. Should it be static? However, this is used in entry.S and therefore shouldn't be static. The same applies to the shadow_stack that this pseudo spinlock is trying to protect, so do like its charge and add a declaration to thread_info.h Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow") Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20230210185945.915806-1-conor@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/asm/thread_info.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index e3866ffa06c5..42d97043e537 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -43,6 +43,7 @@
#ifndef __ASSEMBLY__
extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)];
+extern unsigned long spin_shadow_stack;
#include <asm/processor.h>
#include <asm/csr.h>