提交 8ab2b7ef 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

ftrace: Remove unnecessary disabling of irqs

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: NSteven Rostedt <rostedt@goodmis.org>
上级 0778d9ad
...@@ -2707,7 +2707,6 @@ static int ftrace_process_locs(struct module *mod, ...@@ -2707,7 +2707,6 @@ static int ftrace_process_locs(struct module *mod,
{ {
unsigned long *p; unsigned long *p;
unsigned long addr; unsigned long addr;
unsigned long flags;
mutex_lock(&ftrace_lock); mutex_lock(&ftrace_lock);
p = start; p = start;
...@@ -2724,10 +2723,7 @@ static int ftrace_process_locs(struct module *mod, ...@@ -2724,10 +2723,7 @@ static int ftrace_process_locs(struct module *mod,
ftrace_record_ip(addr); ftrace_record_ip(addr);
} }
/* disable interrupts to prevent kstop machine */
local_irq_save(flags);
ftrace_update_code(mod); ftrace_update_code(mod);
local_irq_restore(flags);
mutex_unlock(&ftrace_lock); mutex_unlock(&ftrace_lock);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册