[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ad5cafcdb09c57008c990edd309c0a563b09f238@git.kernel.org>
Date: Sat, 17 Oct 2009 09:59:07 GMT
From: tip-bot for Masami Hiramatsu <mhiramat@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...hat.com, peterz@...radead.org, fweisbec@...il.com,
rostedt@...dmis.org, ak@...ux.intel.com, jbaron@...hat.com,
tglx@...utronix.de, laijs@...fujitsu.com, mhiramat@...hat.com,
linux-kernel@...r.kernel.org, hpa@...or.com, fche@...hat.com,
jkenisto@...ibm.com, tzanussi@...il.com, lizf@...fujitsu.com,
hch@...radead.org, ananth@...ibm.com, srikar@...ux.vnet.ibm.com,
mingo@...e.hu, prasad@...ux.vnet.ibm.com
Subject: [tip:perf/probes] x86/ptrace: Fix regs_get_argument_nth() to add correct offset
Commit-ID: ad5cafcdb09c57008c990edd309c0a563b09f238
Gitweb: http://git.kernel.org/tip/ad5cafcdb09c57008c990edd309c0a563b09f238
Author: Masami Hiramatsu <mhiramat@...hat.com>
AuthorDate: Thu, 10 Sep 2009 19:53:06 -0400
Committer: Frederic Weisbecker <fweisbec@...il.com>
CommitDate: Fri, 11 Sep 2009 04:14:24 +0200
x86/ptrace: Fix regs_get_argument_nth() to add correct offset
Fix regs_get_argument_nth() to add correct offset bytes. Because
offset_of() returns offset in byte, the offset should be added
to char * instead of unsigned long *.
Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
Cc: Jim Keniston <jkenisto@...ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@...ibm.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Christoph Hellwig <hch@...radead.org>
Cc: Frank Ch. Eigler <fche@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Jason Baron <jbaron@...hat.com>
Cc: K.Prasad <prasad@...ux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Li Zefan <lizf@...fujitsu.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Tom Zanussi <tzanussi@...il.com>
LKML-Reference: <20090910235306.22412.31613.stgit@...p-100-2-132.bos.redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
arch/x86/kernel/ptrace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index a33a17d..caffb68 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -150,7 +150,7 @@ static const int arg_offs_table[] = {
unsigned long regs_get_argument_nth(struct pt_regs *regs, unsigned int n)
{
if (n < ARRAY_SIZE(arg_offs_table))
- return *((unsigned long *)regs + arg_offs_table[n]);
+ return *(unsigned long *)((char *)regs + arg_offs_table[n]);
else {
/*
* The typical case: arg n is on the stack.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists