summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-27 10:08:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-27 10:08:09 -0700
commite09d13c4c8805546d97bcc8c508c07f7d8f4c8e8 (patch)
tree49304cce7cbc67dd188bd35183b89f664343ec27
parentd7d7271f421f1e45289f2a737c7f636c02c673ce (diff)
parentc79aa0d96548aee50570209eb2d45c8f4ac49230 (diff)
downloadlinux-3.10-e09d13c4c8805546d97bcc8c508c07f7d8f4c8e8.tar.gz
linux-3.10-e09d13c4c8805546d97bcc8c508c07f7d8f4c8e8.tar.bz2
linux-3.10-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()
-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 4d3124b3927..9fcb0944f07 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;