From: "Steven Rostedt (Red Hat)" <rost...@goodmis.org>

The parameters for prepare_ftrace_return() used by the function graph
tracer were swapped to simplify the code on x86_64. But i386 function
graph trampoline also calls this function, and it did not have its
parameters swapped.

Link: http://lkml.kernel.org/r/20141210231732.ga24...@wfg-t540p.sh.intel.com

Reported-by: Fengguang Wu <fengguang...@intel.com>
Tested-by: Fengguang Wu <fengguang...@intel.com>
Fixes: 6a06bdbf7f9c "ftrace/fgraph/x86: Have prepare_ftrace_return() take ip as 
first parameter"
Signed-off-by: Steven Rostedt <rost...@goodmis.org>
---
 arch/x86/kernel/entry_32.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index b553ed89e5f5..df3e608d409b 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1192,10 +1192,10 @@ ENTRY(ftrace_graph_caller)
        pushl %eax
        pushl %ecx
        pushl %edx
-       movl 0xc(%esp), %edx
-       lea 0x4(%ebp), %eax
+       movl 0xc(%esp), %eax
+       lea 0x4(%ebp), %edx
        movl (%ebp), %ecx
-       subl $MCOUNT_INSN_SIZE, %edx
+       subl $MCOUNT_INSN_SIZE, %eax
        call prepare_ftrace_return
        popl %edx
        popl %ecx
-- 
2.1.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to