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:
3efa1cc
)
perf_counter, x86: Fix call-chain walking
author
Ingo Molnar
<
[email protected]
>
Fri, 29 May 2009 09:25:09 +0000
(11:25 +0200)
committer
Ingo Molnar
<
[email protected]
>
Sun, 14 Jun 2009 20:37:15 +0000
(22:37 +0200)
Fix the ptregs variant when we hit user-mode tasks.
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Pekka Enberg <
[email protected]
>
Cc: Arjan van de Ven <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Mike Galbraith <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/cpu/perf_counter.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/perf_counter.c
b/arch/x86/kernel/cpu/perf_counter.c
index 77a59a5566a84eb97c5c14f6f874d9d8812ff6ac..09d8cb69c3f3d9b5a1850e8f5bcd22243d22dcaf 100644
(file)
--- a/
arch/x86/kernel/cpu/perf_counter.c
+++ b/
arch/x86/kernel/cpu/perf_counter.c
@@
-1644,7
+1644,9
@@
perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry)
const void __user *fp;
int nr = entry->nr;
- regs = (struct pt_regs *)current->thread.sp0 - 1;
+ if (!user_mode(regs))
+ regs = task_pt_regs(current);
+
fp = (void __user *)regs->bp;
callchain_store(entry, regs->ip);
@@
-1656,7
+1658,7
@@
perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry)
if (!copy_stack_frame(fp, &frame))
break;
- if ((unsigned long)fp <
user_stack_pointer(regs)
)
+ if ((unsigned long)fp <
regs->sp
)
break;
callchain_store(entry, frame.return_address);