We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fed4c9c commit deb0c3cCopy full SHA for deb0c3c
kernel/events/core.c
@@ -10307,7 +10307,6 @@ static struct pmu *perf_init_event(struct perf_event *event)
10307
goto unlock;
10308
}
10309
10310
- rcu_read_lock();
10311
/*
10312
* PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE
10313
* are often aliases for PERF_TYPE_RAW.
@@ -10317,6 +10316,7 @@ static struct pmu *perf_init_event(struct perf_event *event)
10317
10316
type = PERF_TYPE_RAW;
10318
10319
again:
+ rcu_read_lock();
10320
pmu = idr_find(&pmu_idr, type);
10321
rcu_read_unlock();
10322
if (pmu) {
0 commit comments