aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-10 11:53:23 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-11 04:06:13 -0500
commitf47a454db9129d2e61b224a40f4365cdd4f83042 (patch)
tree106e1d50cd407aef60be58711c9ef90a3b4c28db /arch
parent7d6d49b1f5551b87bd59c66c10747b89367760fd (diff)
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> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-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 9d549e4fe880..231bdd3c5b1c 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -488,8 +488,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
488 * ignore such a protection. 488 * ignore such a protection.
489 */ 489 */
490 asm volatile( 490 asm volatile(
491 "1: " _ASM_MOV " (%[parent_old]), %[old]\n" 491 "1: " _ASM_MOV " (%[parent]), %[old]\n"
492 "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n" 492 "2: " _ASM_MOV " %[return_hooker], (%[parent])\n"
493 " movl $0, %[faulted]\n" 493 " movl $0, %[faulted]\n"
494 "3:\n" 494 "3:\n"
495 495
@@ -501,9 +501,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
501 _ASM_EXTABLE(1b, 4b) 501 _ASM_EXTABLE(1b, 4b)
502 _ASM_EXTABLE(2b, 4b) 502 _ASM_EXTABLE(2b, 4b)
503 503
504 : [parent_replaced] "=r" (parent), [old] "=r" (old), 504 : [old] "=r" (old), [faulted] "=r" (faulted)
505 [faulted] "=r" (faulted) 505 : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
506 : [parent_old] "0" (parent), [return_hooker] "r" (return_hooker)
507 : "memory" 506 : "memory"
508 ); 507 );
509 508