aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-01-13 03:58:37 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-13 04:08:50 -0500
commit61405fea92c42d072d9b8bd189689f1502a838af (patch)
tree013ea3e7ed71f4114004d5852d40b6e89e128f76 /kernel/perf_event.c
parent9c443dfdd31eddea6cbe6ee0ca469fbcc4e1dc3b (diff)
parent1703f2c321a8a531c393e137a82602e16c6061cb (diff)
Merge branch 'perf/urgent' into perf/core
Merge reason: queue up dependent patch, update to -rc4 Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 5b987b4a98a8..27f69a04541d 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1618,7 +1618,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu)
1618 * offline CPU and activate it when the CPU comes up, but 1618 * offline CPU and activate it when the CPU comes up, but
1619 * that's for later. 1619 * that's for later.
1620 */ 1620 */
1621 if (!cpu_isset(cpu, cpu_online_map)) 1621 if (!cpu_online(cpu))
1622 return ERR_PTR(-ENODEV); 1622 return ERR_PTR(-ENODEV);
1623 1623
1624 cpuctx = &per_cpu(perf_cpu_context, cpu); 1624 cpuctx = &per_cpu(perf_cpu_context, cpu);
@@ -4725,7 +4725,7 @@ SYSCALL_DEFINE5(perf_event_open,
4725 if (IS_ERR(event)) 4725 if (IS_ERR(event))
4726 goto err_put_context; 4726 goto err_put_context;
4727 4727
4728 err = anon_inode_getfd("[perf_event]", &perf_fops, event, 0); 4728 err = anon_inode_getfd("[perf_event]", &perf_fops, event, O_RDWR);
4729 if (err < 0) 4729 if (err < 0)
4730 goto err_free_put_context; 4730 goto err_free_put_context;
4731 4731
@@ -5149,7 +5149,7 @@ int perf_event_init_task(struct task_struct *child)
5149 GFP_KERNEL); 5149 GFP_KERNEL);
5150 if (!child_ctx) { 5150 if (!child_ctx) {
5151 ret = -ENOMEM; 5151 ret = -ENOMEM;
5152 goto exit; 5152 break;
5153 } 5153 }
5154 5154
5155 __perf_event_init_context(child_ctx, child); 5155 __perf_event_init_context(child_ctx, child);
@@ -5165,7 +5165,7 @@ int perf_event_init_task(struct task_struct *child)
5165 } 5165 }
5166 } 5166 }
5167 5167
5168 if (inherited_all) { 5168 if (child_ctx && inherited_all) {
5169 /* 5169 /*
5170 * Mark the child context as a clone of the parent 5170 * Mark the child context as a clone of the parent
5171 * context, or of whatever the parent is a clone of. 5171 * context, or of whatever the parent is a clone of.
@@ -5185,7 +5185,6 @@ int perf_event_init_task(struct task_struct *child)
5185 get_ctx(child_ctx->parent_ctx); 5185 get_ctx(child_ctx->parent_ctx);
5186 } 5186 }
5187 5187
5188exit:
5189 mutex_unlock(&parent_ctx->mutex); 5188 mutex_unlock(&parent_ctx->mutex);
5190 5189
5191 perf_unpin_context(parent_ctx); 5190 perf_unpin_context(parent_ctx);