mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	eranian@gmail.com, a.p.zijlstra@chello.nl, paulus@samba.org,
	perfmon2-devel@lists.sourceforge.net
Subject: Re: [PATCH] perf_events: fix bogus copy_to_user() in perf_event_read_group()
Date: Mon, 23 Nov 2009 18:07:34 +0100	[thread overview]
Message-ID: <20091123170734.GB6209@elte.hu> (raw)
In-Reply-To: <bd4cb8900911230836na261658udd82f5c20630ffba@mail.gmail.com>


* Stephane Eranian <eranian@google.com> wrote:

> ?? ?? ?? ??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>
> 
> ---
> ??perf_event.c | ?? ??2 +-
> ??1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index 0b0d5f7..8306127 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -1826,7 +1826,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;
> ?? ?? ?? ?? ?? ?? ?? ??}

hm, patch is seriously garbled - mind sending it according to 
Documentation/email-clients.txt?

Thanks,

	Ingo

  parent reply	other threads:[~2009-11-23 17:07 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 ` Stephane Eranian
2009-11-23 16:46   ` Peter Zijlstra
2009-11-23 16:47     ` Stephane Eranian
2009-11-23 17:07   ` Ingo Molnar [this message]
2009-11-24  5:40   ` Stephane Eranian
2009-11-24 16:56     ` [tip:perf/core] perf_events: Fix " tip-bot for Stephane Eranian

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=20091123170734.GB6209@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=eranian@gmail.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®