Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232294
b: refs/heads/master
c: 8550d7c
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed Jan 19, 2011
1 parent a59e096 commit 30d9010
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: dbe08d82ce3967ccdf459f7951d02589cf967300
refs/heads/master: 8550d7cb6ed6c89add49c3b6ad4c753ab8a3d7f9
9 changes: 4 additions & 5 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -6446,11 +6446,6 @@ int perf_event_init_context(struct task_struct *child, int ctxn)
unsigned long flags;
int ret = 0;

child->perf_event_ctxp[ctxn] = NULL;

mutex_init(&child->perf_event_mutex);
INIT_LIST_HEAD(&child->perf_event_list);

if (likely(!parent->perf_event_ctxp[ctxn]))
return 0;

Expand Down Expand Up @@ -6539,6 +6534,10 @@ int perf_event_init_task(struct task_struct *child)
{
int ctxn, ret;

memset(child->perf_event_ctxp, 0, sizeof(child->perf_event_ctxp));
mutex_init(&child->perf_event_mutex);
INIT_LIST_HEAD(&child->perf_event_list);

for_each_task_context_nr(ctxn) {
ret = perf_event_init_context(child, ctxn);
if (ret)
Expand Down

0 comments on commit 30d9010

Please sign in to comment.