Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116604
b: refs/heads/master
c: 3b47bfc
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 14, 2008
1 parent c06f07b commit 6e2a320
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5a81b629ea8feb9e7530cfac35cfb41c45facf3
refs/heads/master: 3b47bfc1fca01cccad9cce2d18b79b18ef2e4131
10 changes: 9 additions & 1 deletion trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
int ftrace_enabled __read_mostly;
static int last_ftrace_enabled;

/*
* Since MCOUNT_ADDR may point to mcount itself, we do not want
* to get it confused by reading a reference in the code as we
* are parsing on objcopy output of text. Use a variable for
* it instead.
*/
static unsigned long mcount_addr = MCOUNT_ADDR;

/*
* ftrace_disabled is set when an anomaly is discovered.
* ftrace_disabled is much stronger than ftrace_enabled.
Expand Down Expand Up @@ -577,7 +585,7 @@ ftrace_code_disable(struct dyn_ftrace *rec)
ip = rec->ip;

nop = ftrace_nop_replace();
call = ftrace_call_replace(ip, MCOUNT_ADDR);
call = ftrace_call_replace(ip, mcount_addr);

failed = ftrace_modify_code(ip, call, nop);
if (failed) {
Expand Down

0 comments on commit 6e2a320

Please sign in to comment.