aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 13:46:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 13:46:55 -0400
commit17fdfd0851617b6c18c0913364caf2a54171ce85 (patch)
treee2c2859f18604e6e1d5406eb08bf2451019be848 /kernel
parenta8432588fc1e406e800e8bf88bebf4cd390b7f46 (diff)
parent6ed0106667d76589cb648c27edb4f4ffbf9d59ca (diff)
Merge tag 'trace-fixes-v3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "Masami Hiramatsu fixed another bug. This time returning a proper result in event_enable_func(). After checking the return status of try_module_get(), it returned the status of try_module_get(). But try_module_get() returns 0 on failure, which is success for event_enable_func()" * tag 'trace-fixes-v3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Return -EBUSY when event_enable_func() fails to get module
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 7a0cf68027cc..27963e2bf4bf 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2072,8 +2072,10 @@ event_enable_func(struct ftrace_hash *hash,
2072 out_reg: 2072 out_reg:
2073 /* Don't let event modules unload while probe registered */ 2073 /* Don't let event modules unload while probe registered */
2074 ret = try_module_get(file->event_call->mod); 2074 ret = try_module_get(file->event_call->mod);
2075 if (!ret) 2075 if (!ret) {
2076 ret = -EBUSY;
2076 goto out_free; 2077 goto out_free;
2078 }
2077 2079
2078 ret = __ftrace_event_enable_disable(file, 1, 1); 2080 ret = __ftrace_event_enable_disable(file, 1, 1);
2079 if (ret < 0) 2081 if (ret < 0)