mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-20 22:15:59 +00:00
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Ingo Molnar: "This fix adds missing RCU read protection" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: events: Protect access via task_subsys_state_check()
This commit is contained in:
commit
e09d13c4c8
1 changed files with 2 additions and 0 deletions
|
@ -4596,6 +4596,7 @@ void perf_event_comm(struct task_struct *task)
|
||||||
struct perf_event_context *ctx;
|
struct perf_event_context *ctx;
|
||||||
int ctxn;
|
int ctxn;
|
||||||
|
|
||||||
|
rcu_read_lock();
|
||||||
for_each_task_context_nr(ctxn) {
|
for_each_task_context_nr(ctxn) {
|
||||||
ctx = task->perf_event_ctxp[ctxn];
|
ctx = task->perf_event_ctxp[ctxn];
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
|
@ -4603,6 +4604,7 @@ void perf_event_comm(struct task_struct *task)
|
||||||
|
|
||||||
perf_event_enable_on_exec(ctx);
|
perf_event_enable_on_exec(ctx);
|
||||||
}
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
|
|
||||||
if (!atomic_read(&nr_comm_events))
|
if (!atomic_read(&nr_comm_events))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue