Skip to content

Commit 23c1075

Browse files
Kefeng Wangpalmer-dabbelt
authored andcommitted
riscv: Drop const annotation for sp
The const annotation should not be used for 'sp', or it will become read only and lead to bad stack output. Fixes: dec8227 ("riscv: stacktrace: Move register keyword to beginning of declaration") Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
1 parent a5e13c6 commit 23c1075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/stacktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <asm/stacktrace.h>
1616

17-
register const unsigned long sp_in_global __asm__("sp");
17+
register unsigned long sp_in_global __asm__("sp");
1818

1919
#ifdef CONFIG_FRAME_POINTER
2020

0 commit comments

Comments
 (0)