Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257121
b: refs/heads/master
c: 4376cac
h: refs/heads/master
i:
  257119: adf5456
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jul 8, 2011
1 parent fef4c42 commit 81897e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: e4a3f541f0b67fdad98b326c851dfe7f4b6b6dad
refs/heads/master: 4376cac66778b25e599be3f5d54f33f58ba8ead7
16 changes: 11 additions & 5 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,7 @@ static int ftrace_process_locs(struct module *mod,
{
unsigned long *p;
unsigned long addr;
unsigned long flags;
unsigned long flags = 0; /* Shut up gcc */

mutex_lock(&ftrace_lock);
p = start;
Expand All @@ -3336,12 +3336,18 @@ static int ftrace_process_locs(struct module *mod,
}

/*
* Disable interrupts to prevent interrupts from executing
* code that is being modified.
* We only need to disable interrupts on start up
* because we are modifying code that an interrupt
* may execute, and the modification is not atomic.
* But for modules, nothing runs the code we modify
* until we are finished with it, and there's no
* reason to cause large interrupt latencies while we do it.
*/
local_irq_save(flags);
if (!mod)
local_irq_save(flags);
ftrace_update_code(mod);
local_irq_restore(flags);
if (!mod)
local_irq_restore(flags);
mutex_unlock(&ftrace_lock);

return 0;
Expand Down

0 comments on commit 81897e7

Please sign in to comment.