Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312249
b: refs/heads/master
c: fbfc623
h: refs/heads/master
i:
  312247: a5fe36d
v: v3
  • Loading branch information
Yan, Zheng authored and Ingo Molnar committed Jun 18, 2012
1 parent cd161ca commit 82b07eb
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 4b4969b14490a4f65b572b8f180164181104b5e1
refs/heads/master: fbfc623f8231c8d8c78aab5841e9c6e5811ab638
5 changes: 5 additions & 0 deletions trunk/kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6252,6 +6252,8 @@ SYSCALL_DEFINE5(perf_event_open,
}
}

get_online_cpus();

event = perf_event_alloc(&attr, cpu, task, group_leader, NULL,
NULL, NULL);
if (IS_ERR(event)) {
Expand Down Expand Up @@ -6391,6 +6393,8 @@ SYSCALL_DEFINE5(perf_event_open,
perf_unpin_context(ctx);
mutex_unlock(&ctx->mutex);

put_online_cpus();

event->owner = current;

mutex_lock(&current->perf_event_mutex);
Expand Down Expand Up @@ -6419,6 +6423,7 @@ SYSCALL_DEFINE5(perf_event_open,
err_alloc:
free_event(event);
err_task:
put_online_cpus();
if (task)
put_task_struct(task);
err_group_fd:
Expand Down

0 comments on commit 82b07eb

Please sign in to comment.