Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 131aee8b authored by Guo Ren's avatar Guo Ren
Browse files

csky: Fixup dead loop in show_stack



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: default avatarGuo Ren <ren_guo@c-sky.com>
Reported-by: default avatarLu Baoquan <lu.baoquan@intellif.com>
parent 76d21d18
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);