Skip to content

Commit eb9be83

Browse files
ConchuODpalmer-dabbelt
authored andcommitted
RISC-V: add a spin_shadow_stack declaration
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: 7e18643 ("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>
1 parent a3c7d6b commit eb9be83

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/riscv/include/asm/thread_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#ifndef __ASSEMBLY__
4444

4545
extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)];
46+
extern unsigned long spin_shadow_stack;
4647

4748
#include <asm/processor.h>
4849
#include <asm/csr.h>

0 commit comments

Comments
 (0)