Commit 61642e3e authored by Russell King's avatar Russell King

[ARM] Fix profile_pc() for SMP

profile_pc() used thread_saved_fp() with the current task.  However,
thread_saved_fp() only returns sane values when called for threads
which are presently sleeping, so this caused an oops.  Instead, use
regs->ARM_fp, which correspond with the frame pointer.
parent bfc52a39
...@@ -63,7 +63,7 @@ unsigned long profile_pc(struct pt_regs *regs) ...@@ -63,7 +63,7 @@ unsigned long profile_pc(struct pt_regs *regs)
unsigned long fp, pc = instruction_pointer(regs); unsigned long fp, pc = instruction_pointer(regs);
if (in_lock_functions(pc)) { if (in_lock_functions(pc)) {
fp = thread_saved_fp(current); fp = regs->ARM_fp;
pc = pc_pointer(((unsigned long *)fp)[-1]); pc = pc_pointer(((unsigned long *)fp)[-1]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment