From 2735da6316af256e62d5f6c15ffa451182734bc3 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 9 Jun 2011 10:19:15 -0400 Subject: Revert "ftrace: Remove unnecessary disabling of irqs" This reverts commit 8ab2b7efd3e2ccf2c2dda3206b8171ecdbd0af40. --- kernel/trace/ftrace.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1ee417f..a75432a 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3330,6 +3330,7 @@ static int ftrace_process_locs(struct module *mod, { unsigned long *p; unsigned long addr; + unsigned long flags; mutex_lock(&ftrace_lock); p = start; @@ -3346,7 +3347,10 @@ 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; -- 1.7.5.2