[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-184d3da8ef0ca552dffa0fdd35c046e058a2cf9a@git.kernel.org>
Date: Tue, 24 Nov 2009 16:56:07 GMT
From: tip-bot for Stephane Eranian <eranian@...gle.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, hpa@...or.com,
mingo@...hat.com, peterz@...radead.org, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perf/core] perf_events: Fix bogus copy_to_user() in perf_event_read_group()
Commit-ID: 184d3da8ef0ca552dffa0fdd35c046e058a2cf9a
Gitweb: http://git.kernel.org/tip/184d3da8ef0ca552dffa0fdd35c046e058a2cf9a
Author: Stephane Eranian <eranian@...gle.com>
AuthorDate: Mon, 23 Nov 2009 21:40:49 -0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 24 Nov 2009 08:55:27 +0100
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@...gle.com>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Cc: paulus@...ba.org
Cc: perfmon2-devel@...ts.sourceforge.net
LKML-Reference: <4b0b71e1.0508d00a.075e.ffff84a3@...google.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/perf_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 9425c96..accfd7b 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,
size = n * sizeof(u64);
- if (copy_to_user(buf + size, values, size)) {
+ if (copy_to_user(buf + ret, values, size)) {
ret = -EFAULT;
goto unlock;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists