diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 9 | ||||
-rw-r--r-- | kernel/trace/trace_kprobe.c | 8 |
2 files changed, 14 insertions, 3 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; |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index f925c45f0afa..27d13b36b8be 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -1870,8 +1870,12 @@ fs_initcall(init_kprobe_trace); | |||
1870 | 1870 | ||
1871 | #ifdef CONFIG_FTRACE_STARTUP_TEST | 1871 | #ifdef CONFIG_FTRACE_STARTUP_TEST |
1872 | 1872 | ||
1873 | static int kprobe_trace_selftest_target(int a1, int a2, int a3, | 1873 | /* |
1874 | int a4, int a5, int a6) | 1874 | * The "__used" keeps gcc from removing the function symbol |
1875 | * from the kallsyms table. | ||
1876 | */ | ||
1877 | static __used int kprobe_trace_selftest_target(int a1, int a2, int a3, | ||
1878 | int a4, int a5, int a6) | ||
1875 | { | 1879 | { |
1876 | return a1 + a2 + a3 + a4 + a5 + a6; | 1880 | return a1 + a2 + a3 + a4 + a5 + a6; |
1877 | } | 1881 | } |