From: tip-bot for Stephane Eranian <eranian@google.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/core] perf_events: Fix bogus copy_to_user() in perf_event_read_group()
Date: Tue, 24 Nov 2009 16:56:07 GMT [thread overview]
Message-ID: <tip-184d3da8ef0ca552dffa0fdd35c046e058a2cf9a@git.kernel.org> (raw)
In-Reply-To: <4b0b71e1.0508d00a.075e.ffff84a3@mx.google.com>
Commit-ID: 184d3da8ef0ca552dffa0fdd35c046e058a2cf9a
Gitweb: http://git.kernel.org/tip/184d3da8ef0ca552dffa0fdd35c046e058a2cf9a
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Mon, 23 Nov 2009 21:40:49 -0800
Committer: Ingo Molnar <mingo@elte.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@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>
---
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;
}
prev parent reply other threads:[~2009-11-24 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4b0ab8b1.1c07d00a.4859.5f71@mx.google.com>
2009-11-23 16:36 ` [PATCH] perf_events: fix bogus copy_to_user() in perf_event_read_group() Stephane Eranian
2009-11-23 16:46 ` Peter Zijlstra
2009-11-23 16:47 ` Stephane Eranian
2009-11-23 17:07 ` Ingo Molnar
2009-11-24 5:40 ` Stephane Eranian
2009-11-24 16:56 ` tip-bot for Stephane Eranian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-184d3da8ef0ca552dffa0fdd35c046e058a2cf9a@git.kernel.org \
--to=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.