projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5e13c6
)
riscv: Drop const annotation for sp
author
Kefeng Wang
<wangkefeng.wang@huawei.com>
Wed, 17 Mar 2021 15:08:38 +0000
(23:08 +0800)
committer
Palmer Dabbelt
<palmerdabbelt@google.com>
Fri, 2 Apr 2021 04:37:03 +0000
(21:37 -0700)
The const annotation should not be used for 'sp', or it will
become read only and lead to bad stack output.
Fixes: dec822771b01 ("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>
arch/riscv/kernel/stacktrace.c
patch
|
blob
|
history
diff --git
a/arch/riscv/kernel/stacktrace.c
b/arch/riscv/kernel/stacktrace.c
index 3f893c9d9d85a37ab08b0e2a3e447902156dc6bc..2b3e0cb90d789bec4bd0b84acadc0d91b4cb4cd2 100644
(file)
--- a/
arch/riscv/kernel/stacktrace.c
+++ b/
arch/riscv/kernel/stacktrace.c
@@
-14,7
+14,7
@@
#include <asm/stacktrace.h>
-register
const
unsigned long sp_in_global __asm__("sp");
+register unsigned long sp_in_global __asm__("sp");
#ifdef CONFIG_FRAME_POINTER