summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 10:46:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 10:46:55 -0700
commit17fdfd0851617b6c18c0913364caf2a54171ce85 (patch)
treee2c2859f18604e6e1d5406eb08bf2451019be848 /kernel
parenta8432588fc1e406e800e8bf88bebf4cd390b7f46 (diff)
parent6ed0106667d76589cb648c27edb4f4ffbf9d59ca (diff)
downloadlinux-17fdfd0851617b6c18c0913364caf2a54171ce85.tar.gz
linux-17fdfd0851617b6c18c0913364caf2a54171ce85.tar.bz2
linux-17fdfd0851617b6c18c0913364caf2a54171ce85.zip
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,
out_reg:
/* Don't let event modules unload while probe registered */
ret = try_module_get(file->event_call->mod);
- if (!ret)
+ if (!ret) {
+ ret = -EBUSY;
goto out_free;
+ }
ret = __ftrace_event_enable_disable(file, 1, 1);
if (ret < 0)