Skip to content

Commit d1ba71f

Browse files
committed
sh64: oprofile: Fix up kernel stack pointer size mismatch.
For the backtrace code its assumed that the stack pointer is 32-bits, which is not the case with the sh64 registers. Use the shared kernel_stack_pointer() helper to get at the actual register, which already takes care of the necessary typecasting. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 2e4f17d commit d1ba71f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/sh/oprofile/backtrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void sh_backtrace(struct pt_regs * const regs, unsigned int depth)
9191
if (depth > backtrace_limit)
9292
depth = backtrace_limit;
9393

94-
stackaddr = (unsigned long *)regs->regs[15];
94+
stackaddr = (unsigned long *)kernel_stack_pointer(regs);
9595
if (!user_mode(regs)) {
9696
if (depth)
9797
unwind_stack(NULL, regs, stackaddr,

0 commit comments

Comments
 (0)