projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76d21d1
)
csky: Fixup dead loop in show_stack
author
Guo Ren
<ren_guo@c-sky.com>
Thu, 31 Jan 2019 06:34:37 +0000
(14:34 +0800)
committer
Guo Ren
<ren_guo@c-sky.com>
Wed, 13 Feb 2019 01:48:14 +0000
(09:48 +0800)
When STACKTRACE is enabled, we must pass fp as stack for unwind,
otherwise random value in stack will casue a dead loop.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reported-by: Lu Baoquan <lu.baoquan@intellif.com>
arch/csky/kernel/dumpstack.c
patch
|
blob
|
history
diff --git
a/arch/csky/kernel/dumpstack.c
b/arch/csky/kernel/dumpstack.c
index 659253e9989cb062e84f38c04ce9d4219ebf1d2e..d67f9777cfd9d7a10ca0b439937fd9784f88f8e6 100644
(file)
--- a/
arch/csky/kernel/dumpstack.c
+++ b/
arch/csky/kernel/dumpstack.c
@@
-38,7
+38,11
@@
void show_stack(struct task_struct *task, unsigned long *stack)
if (task)
stack = (unsigned long *)thread_saved_fp(task);
else
+#ifdef CONFIG_STACKTRACE
+ asm volatile("mov %0, r8\n":"=r"(stack)::"memory");
+#else
stack = (unsigned long *)&stack;
+#endif
}
show_trace(stack);