aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_event_perf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-10 07:31:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-10 07:31:24 -0700
commitf2955b490b249ca56e465fd32cc355f84aedf8bd (patch)
tree401faf98c61f4a0a65703644277521a10da98eec /kernel/trace/trace_event_perf.c
parent3d96406c7da1ed5811ea52a3b0905f4f0e295376 (diff)
parent9efdda310cb26bdc28429cb831c3ec5fa270feb7 (diff)
downloadmrst-s0i3-test-f2955b490b249ca56e465fd32cc355f84aedf8bd.tar.gz
mrst-s0i3-test-f2955b490b249ca56e465fd32cc355f84aedf8bd.tar.xz
mrst-s0i3-test-f2955b490b249ca56e465fd32cc355f84aedf8bd.zip
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing: t_start: reset FTRACE_ITER_HASH in case of seek/pread perf symbols: Fix multiple initialization of symbol system perf: Fix CPU hotplug perf, trace: Fix module leak tracing/kprobe: Fix handling of C-unlike argument names tracing/kprobes: Fix handling of argument names perf probe: Fix handling of arguments names perf probe: Fix return probe support tracing/kprobe: Fix a memory leak in error case tracing: Do not allow llseek to set_ftrace_filter
Diffstat (limited to 'kernel/trace/trace_event_perf.c')
-rw-r--r--kernel/trace/trace_event_perf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index 000e6e85b44..31cc4cb0dbf 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -91,6 +91,8 @@ int perf_trace_init(struct perf_event *p_event)
tp_event->class && tp_event->class->reg &&
try_module_get(tp_event->mod)) {
ret = perf_trace_event_init(tp_event, p_event);
+ if (ret)
+ module_put(tp_event->mod);
break;
}
}
@@ -146,6 +148,7 @@ void perf_trace_destroy(struct perf_event *p_event)
}
}
out:
+ module_put(tp_event->mod);
mutex_unlock(&event_mutex);
}