Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140833
b: refs/heads/master
c: 11a241a
h: refs/heads/master
i:
  140831: f8c4606
v: v3
  • Loading branch information
Steven Rostedt committed Mar 2, 2009
1 parent 954c487 commit 34208dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d20e3b03842bfeb9d21817ff19054c277cc3eac0
refs/heads/master: 11a241a3302277db05561e01477528629d806c4e
7 changes: 7 additions & 0 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#define TRACE_SYSTEM "TRACE_SYSTEM"

static DEFINE_MUTEX(event_mutex);

#define events_for_each(event) \
for (event = __start_ftrace_events; \
(unsigned long)event < (unsigned long)__stop_ftrace_events; \
Expand Down Expand Up @@ -104,6 +106,7 @@ static int ftrace_set_clr_event(char *buf, int set)
event = NULL;
}

mutex_lock(&event_mutex);
events_for_each(call) {

if (!call->name)
Expand All @@ -124,6 +127,8 @@ static int ftrace_set_clr_event(char *buf, int set)

ret = 0;
}
mutex_unlock(&event_mutex);

return ret;
}

Expand Down Expand Up @@ -324,7 +329,9 @@ event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
switch (val) {
case 0:
case 1:
mutex_lock(&event_mutex);
ftrace_event_enable_disable(call, val);
mutex_unlock(&event_mutex);
break;

default:
Expand Down

0 comments on commit 34208dd

Please sign in to comment.