summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-10 11:53:23 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-10 11:53:23 -0500
commit966657883fdc3a2883a5e641ca4ec8f79ffb8ecd (patch)
treea76988537c037bf8eb9a9496422fa55162e75d77 /arch/x86/kernel
parent667d24125839b6f3363d8177d7ed9fab8a40e45f (diff)
downloadlinux-966657883fdc3a2883a5e641ca4ec8f79ffb8ecd.tar.gz
linux-966657883fdc3a2883a5e641ca4ec8f79ffb8ecd.tar.bz2
linux-966657883fdc3a2883a5e641ca4ec8f79ffb8ecd.zip
tracing, x86: fix constraint for parent variable
The constraint used for retrieving and restoring the parent function pointer is incorrect. The parent variable is a pointer, and the address of the pointer is modified by the asm statement and not the pointer itself. It is incorrect to pass it in as an output constraint since the asm will never update the pointer. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/ftrace.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 18828aee8781..370bafaa43a3 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -468,8 +468,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
* ignore such a protection.
*/
asm volatile(
- "1: " _ASM_MOV " (%[parent_old]), %[old]\n"
- "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n"
+ "1: " _ASM_MOV " (%[parent]), %[old]\n"
+ "2: " _ASM_MOV " %[return_hooker], (%[parent])\n"
" movl $0, %[faulted]\n"
".section .fixup, \"ax\"\n"
@@ -479,9 +479,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
_ASM_EXTABLE(1b, 3b)
_ASM_EXTABLE(2b, 3b)
- : [parent_replaced] "=r" (parent), [old] "=r" (old),
- [faulted] "=r" (faulted)
- : [parent_old] "0" (parent), [return_hooker] "r" (return_hooker)
+ : [old] "=r" (old), [faulted] "=r" (faulted)
+ : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
: "memory"
);