Skip to content

Commit

Permalink
Merge tag 'trace-fixes-v3.10-rc2' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/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
  • Loading branch information
Linus Torvalds committed May 24, 2013
2 parents a843258 + 6ed0106 commit 17fdfd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17fdfd0

Please sign in to comment.