Skip to content

Commit

Permalink
ftrace: Remove unnecessary disabling of irqs
Browse files Browse the repository at this point in the history
The disabling of interrupts around ftrace_update_code() was used
to protect against the evil ftrace daemon from years past. But that
daemon has long been killed. It is safe to keep interrupts enabled
while updating the initial mcount into nops.

The ftrace_mutex is also held which keeps other users at bay.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Apr 30, 2011
1 parent 0778d9a commit 8ab2b7e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2707,7 +2707,6 @@ static int ftrace_process_locs(struct module *mod,
{
unsigned long *p;
unsigned long addr;
unsigned long flags;

mutex_lock(&ftrace_lock);
p = start;
Expand All @@ -2724,10 +2723,7 @@ static int ftrace_process_locs(struct module *mod,
ftrace_record_ip(addr);
}

/* disable interrupts to prevent kstop machine */
local_irq_save(flags);
ftrace_update_code(mod);
local_irq_restore(flags);
mutex_unlock(&ftrace_lock);

return 0;
Expand Down

0 comments on commit 8ab2b7e

Please sign in to comment.