aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-01-28 09:42:56 -0500
committerIngo Molnar <mingo@kernel.org>2015-01-28 09:42:56 -0500
commitf10698ed6807dc41d021fb7baeb24f9bc4051837 (patch)
treefe9229efe38ad31788843a7535bfc3feb89f79a7 /kernel/events
parent86038c5ea81b519a8a1fcfcd5e4599aab0cdd119 (diff)
parente742f3dc0886a92403d578e8ac771e5e33d06d08 (diff)
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index c10124b772c4..b4a696c4dc76 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6787,7 +6787,6 @@ skip_type:
6787 __perf_event_init_context(&cpuctx->ctx); 6787 __perf_event_init_context(&cpuctx->ctx);
6788 lockdep_set_class(&cpuctx->ctx.mutex, &cpuctx_mutex); 6788 lockdep_set_class(&cpuctx->ctx.mutex, &cpuctx_mutex);
6789 lockdep_set_class(&cpuctx->ctx.lock, &cpuctx_lock); 6789 lockdep_set_class(&cpuctx->ctx.lock, &cpuctx_lock);
6790 cpuctx->ctx.type = cpu_context;
6791 cpuctx->ctx.pmu = pmu; 6790 cpuctx->ctx.pmu = pmu;
6792 6791
6793 __perf_cpu_hrtimer_init(cpuctx, cpu); 6792 __perf_cpu_hrtimer_init(cpuctx, cpu);
@@ -7431,7 +7430,19 @@ SYSCALL_DEFINE5(perf_event_open,
7431 * task or CPU context: 7430 * task or CPU context:
7432 */ 7431 */
7433 if (move_group) { 7432 if (move_group) {
7434 if (group_leader->ctx->type != ctx->type) 7433 /*
7434 * Make sure we're both on the same task, or both
7435 * per-cpu events.
7436 */
7437 if (group_leader->ctx->task != ctx->task)
7438 goto err_context;
7439
7440 /*
7441 * Make sure we're both events for the same CPU;
7442 * grouping events for different CPUs is broken; since
7443 * you can never concurrently schedule them anyhow.
7444 */
7445 if (group_leader->cpu != event->cpu)
7435 goto err_context; 7446 goto err_context;
7436 } else { 7447 } else {
7437 if (group_leader->ctx != ctx) 7448 if (group_leader->ctx != ctx)