aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2009-11-24 00:40:49 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-24 02:55:27 -0500
commit184d3da8ef0ca552dffa0fdd35c046e058a2cf9a (patch)
tree4f7bc687cea6ce6ee13a8beec59d8ae7081dfb64 /kernel
parentb23d5767a5818caec8547d0bce1588b02bdecd30 (diff)
perf_events: Fix bogus copy_to_user() in perf_event_read_group()
When using an event group, the value and id for non leaders events were wrong due to invalid offset into the outgoing buffer. Signed-off-by: Stephane Eranian <eranian@google.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: paulus@samba.org Cc: perfmon2-devel@lists.sourceforge.net LKML-Reference: <4b0b71e1.0508d00a.075e.ffff84a3@mx.google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 9425c9600c89..accfd7bfe387 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1831,7 +1831,7 @@ static int perf_event_read_group(struct perf_event *event,
1831 1831
1832 size = n * sizeof(u64); 1832 size = n * sizeof(u64);
1833 1833
1834 if (copy_to_user(buf + size, values, size)) { 1834 if (copy_to_user(buf + ret, values, size)) {
1835 ret = -EFAULT; 1835 ret = -EFAULT;
1836 goto unlock; 1836 goto unlock;
1837 } 1837 }