Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234497
b: refs/heads/master
c: 940c5b2
h: refs/heads/master
i:
  234495: 17e5225
v: v3
  • Loading branch information
Lin Ming authored and Ingo Molnar committed Mar 4, 2011
1 parent b7de693 commit c372021
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 888a8a3e9d79cbb9d83e53955f684998248580ec
refs/heads/master: 940c5b2971de443df22eed0441bc74fb0116e9f5
9 changes: 7 additions & 2 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -6098,17 +6098,22 @@ struct pmu *perf_init_event(struct perf_event *event)
{
struct pmu *pmu = NULL;
int idx;
int ret;

idx = srcu_read_lock(&pmus_srcu);

rcu_read_lock();
pmu = idr_find(&pmu_idr, event->attr.type);
rcu_read_unlock();
if (pmu)
if (pmu) {
ret = pmu->event_init(event);
if (ret)
pmu = ERR_PTR(ret);
goto unlock;
}

list_for_each_entry_rcu(pmu, &pmus, entry) {
int ret = pmu->event_init(event);
ret = pmu->event_init(event);
if (!ret)
goto unlock;

Expand Down

0 comments on commit c372021

Please sign in to comment.