csky: fixup dead loop in show_stack
Subsystems (2)
[email protected]
maintainerPATCH 1/1 csky: fixup dead loop in show_stack
From: Guo Ren <[email protected]>
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 <[email protected]>
Reported-by Lu Baoquan <[email protected]>
--- arch/csky/kernel/dumpstack.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/csky/kernel/dumpstack.c +4 -0
@@ -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 + asmvolatile ("mov %0, r8\n" :"=r" (stack)::"memory" ); +#else stack = (unsigned long *)&stack; +#endif }show_trace (stack);
Signature · 1 line
2.7.4