diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1ee417fcbfa5..908038f57440 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2740,7 +2740,7 @@ static int ftrace_process_regex(struct ftrace_hash *hash, | |||
2740 | { | 2740 | { |
2741 | char *func, *command, *next = buff; | 2741 | char *func, *command, *next = buff; |
2742 | struct ftrace_func_command *p; | 2742 | struct ftrace_func_command *p; |
2743 | int ret; | 2743 | int ret = -EINVAL; |
2744 | 2744 | ||
2745 | func = strsep(&next, ":"); | 2745 | func = strsep(&next, ":"); |
2746 | 2746 | ||
@@ -3330,6 +3330,7 @@ static int ftrace_process_locs(struct module *mod, | |||
3330 | { | 3330 | { |
3331 | unsigned long *p; | 3331 | unsigned long *p; |
3332 | unsigned long addr; | 3332 | unsigned long addr; |
3333 | unsigned long flags; | ||
3333 | 3334 | ||
3334 | mutex_lock(&ftrace_lock); | 3335 | mutex_lock(&ftrace_lock); |
3335 | p = start; | 3336 | p = start; |
@@ -3346,7 +3347,13 @@ static int ftrace_process_locs(struct module *mod, | |||
3346 | ftrace_record_ip(addr); | 3347 | ftrace_record_ip(addr); |
3347 | } | 3348 | } |
3348 | 3349 | ||
3350 | /* | ||
3351 | * Disable interrupts to prevent interrupts from executing | ||
3352 | * code that is being modified. | ||
3353 | */ | ||
3354 | local_irq_save(flags); | ||
3349 | ftrace_update_code(mod); | 3355 | ftrace_update_code(mod); |
3356 | local_irq_restore(flags); | ||
3350 | mutex_unlock(&ftrace_lock); | 3357 | mutex_unlock(&ftrace_lock); |
3351 | 3358 | ||
3352 | return 0; | 3359 | return 0; |