Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162958
b: refs/heads/master
c: 558e654
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Steven Rostedt committed Sep 13, 2009
1 parent 51ca057 commit 00bf013
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4818d80942b7c0021d213b7c5f1a14a832820a01
refs/heads/master: 558e6547e4b8a2b13608a24a9d3679802f91c4c7
5 changes: 4 additions & 1 deletion trunk/kernel/trace/trace_event_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*
*/

#include <linux/module.h>
#include "trace.h"

int ftrace_profile_enable(int event_id)
Expand All @@ -14,7 +15,8 @@ int ftrace_profile_enable(int event_id)

mutex_lock(&event_mutex);
list_for_each_entry(event, &ftrace_events, list) {
if (event->id == event_id && event->profile_enable) {
if (event->id == event_id && event->profile_enable &&
try_module_get(event->mod)) {
ret = event->profile_enable(event);
break;
}
Expand All @@ -32,6 +34,7 @@ void ftrace_profile_disable(int event_id)
list_for_each_entry(event, &ftrace_events, list) {
if (event->id == event_id) {
event->profile_disable(event);
module_put(event->mod);
break;
}
}
Expand Down

0 comments on commit 00bf013

Please sign in to comment.