From: Pekka Paalanen <pq@iki.fi>
To: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes
Date: Thu, 26 Mar 2009 20:13:24 +0200 [thread overview]
Message-ID: <20090326201324.7952c874@daedalus.pq.iki.fi> (raw)
In-Reply-To: <87zlf8kxmd.wl%vmayatsk@redhat.com>
On Thu, 26 Mar 2009 18:22:18 +0100
Vitaly Mayatskikh <v.mayatskih@gmail.com> wrote:
> If tracer will not provide input buffer of enough size, he will never
> see data between cnt and len bytes.
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 17bb88d..0217615 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -477,7 +477,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)
> if (ret)
> return -EFAULT;
>
> - s->readpos += len;
> + s->readpos += cnt;
> return cnt;
> }
This fix seems to be already included in tip/master:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
It's not in Linus' master, but I guess it's on its way there.
Thanks.
--
Pekka Paalanen
http://www.iki.fi/pq/
next prev parent reply other threads:[~2009-03-26 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 17:22 Vitaly Mayatskikh
2009-03-26 18:13 ` Pekka Paalanen [this message]
2009-03-26 18:55 ` Vitaly Mayatskikh
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=20090326201324.7952c874@daedalus.pq.iki.fi \
--to=pq@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=v.mayatskih@gmail.com \
/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®