summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-27 19:08:09 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-27 19:08:09 +0200
commite09d13c4c8805546d97bcc8c508c07f7d8f4c8e8 (patch)
tree49304cce7cbc67dd188bd35183b89f664343ec27 /kernel
parentMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentevents: Protect access via task_subsys_state_check() (diff)
downloadlinux-e09d13c4c8805546d97bcc8c508c07f7d8f4c8e8.tar.xz
linux-e09d13c4c8805546d97bcc8c508c07f7d8f4c8e8.zip
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()
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 4d3124b39277..9fcb0944f071 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4596,6 +4596,7 @@ void perf_event_comm(struct task_struct *task)
struct perf_event_context *ctx;
int ctxn;
+ rcu_read_lock();
for_each_task_context_nr(ctxn) {
ctx = task->perf_event_ctxp[ctxn];
if (!ctx)
@@ -4603,6 +4604,7 @@ void perf_event_comm(struct task_struct *task)
perf_event_enable_on_exec(ctx);
}
+ rcu_read_unlock();
if (!atomic_read(&nr_comm_events))
return;