summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 19:46:55 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 19:46:55 +0200
commit17fdfd0851617b6c18c0913364caf2a54171ce85 (patch)
treee2c2859f18604e6e1d5406eb08bf2451019be848 /kernel
parentMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 (diff)
parenttracing: Return -EBUSY when event_enable_func() fails to get module (diff)
downloadlinux-17fdfd0851617b6c18c0913364caf2a54171ce85.tar.xz
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)