Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147715
b: refs/heads/master
c: 66fff22
h: refs/heads/master
i:
  147713: 546043d
  147711: fb128f4
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 11, 2009
1 parent 0f0976b commit 02420a2
Show file tree
Hide file tree
Showing 2 changed files with 13 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: f7b7c26e01e51fe46097e11f179dc71ce7950084
refs/heads/master: 66fff22483d8542dfb4d61a28d21277bbde321e8
13 changes: 12 additions & 1 deletion trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -3879,7 +3879,18 @@ void perf_counter_exit_task(struct task_struct *child)
spin_unlock(&child_ctx->lock);
local_irq_restore(flags);

mutex_lock(&child_ctx->mutex);
/*
* We can recurse on the same lock type through:
*
* __perf_counter_exit_task()
* sync_child_counter()
* fput(parent_counter->filp)
* perf_release()
* mutex_lock(&ctx->mutex)
*
* But since its the parent context it won't be the same instance.
*/
mutex_lock_nested(&child_ctx->mutex, SINGLE_DEPTH_NESTING);

again:
list_for_each_entry_safe(child_counter, tmp, &child_ctx->counter_list,
Expand Down

0 comments on commit 02420a2

Please sign in to comment.