diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 38277af44f5c..576c41644e77 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/hash.h> | 34 | #include <linux/hash.h> |
35 | #include <linux/rcupdate.h> | 35 | #include <linux/rcupdate.h> |
36 | #include <linux/kprobes.h> | 36 | #include <linux/kprobes.h> |
37 | #include <linux/memory.h> | ||
38 | 37 | ||
39 | #include <trace/events/sched.h> | 38 | #include <trace/events/sched.h> |
40 | 39 | ||
@@ -2611,12 +2610,10 @@ static void ftrace_run_update_code(int command) | |||
2611 | { | 2610 | { |
2612 | int ret; | 2611 | int ret; |
2613 | 2612 | ||
2614 | mutex_lock(&text_mutex); | ||
2615 | |||
2616 | ret = ftrace_arch_code_modify_prepare(); | 2613 | ret = ftrace_arch_code_modify_prepare(); |
2617 | FTRACE_WARN_ON(ret); | 2614 | FTRACE_WARN_ON(ret); |
2618 | if (ret) | 2615 | if (ret) |
2619 | goto out_unlock; | 2616 | return; |
2620 | 2617 | ||
2621 | /* | 2618 | /* |
2622 | * By default we use stop_machine() to modify the code. | 2619 | * By default we use stop_machine() to modify the code. |
@@ -2628,9 +2625,6 @@ static void ftrace_run_update_code(int command) | |||
2628 | 2625 | ||
2629 | ret = ftrace_arch_code_modify_post_process(); | 2626 | ret = ftrace_arch_code_modify_post_process(); |
2630 | FTRACE_WARN_ON(ret); | 2627 | FTRACE_WARN_ON(ret); |
2631 | |||
2632 | out_unlock: | ||
2633 | mutex_unlock(&text_mutex); | ||
2634 | } | 2628 | } |
2635 | 2629 | ||
2636 | static void ftrace_run_modify_code(struct ftrace_ops *ops, int command, | 2630 | static void ftrace_run_modify_code(struct ftrace_ops *ops, int command, |
@@ -5784,7 +5778,6 @@ void ftrace_module_enable(struct module *mod) | |||
5784 | struct ftrace_page *pg; | 5778 | struct ftrace_page *pg; |
5785 | 5779 | ||
5786 | mutex_lock(&ftrace_lock); | 5780 | mutex_lock(&ftrace_lock); |
5787 | mutex_lock(&text_mutex); | ||
5788 | 5781 | ||
5789 | if (ftrace_disabled) | 5782 | if (ftrace_disabled) |
5790 | goto out_unlock; | 5783 | goto out_unlock; |
@@ -5846,7 +5839,6 @@ void ftrace_module_enable(struct module *mod) | |||
5846 | ftrace_arch_code_modify_post_process(); | 5839 | ftrace_arch_code_modify_post_process(); |
5847 | 5840 | ||
5848 | out_unlock: | 5841 | out_unlock: |
5849 | mutex_unlock(&text_mutex); | ||
5850 | mutex_unlock(&ftrace_lock); | 5842 | mutex_unlock(&ftrace_lock); |
5851 | 5843 | ||
5852 | process_cached_mods(mod->name); | 5844 | process_cached_mods(mod->name); |