* [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes
@ 2009-03-26 17:22 Vitaly Mayatskikh
2009-03-26 18:13 ` Pekka Paalanen
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Mayatskikh @ 2009-03-26 17:22 UTC (permalink / raw)
To: linux-kernel; +Cc: Pekka Paalanen
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;
}
--
wbr, Vitaly
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes
2009-03-26 17:22 [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes Vitaly Mayatskikh
@ 2009-03-26 18:13 ` Pekka Paalanen
2009-03-26 18:55 ` Vitaly Mayatskikh
0 siblings, 1 reply; 3+ messages in thread
From: Pekka Paalanen @ 2009-03-26 18:13 UTC (permalink / raw)
To: Vitaly Mayatskikh; +Cc: linux-kernel, Steven Rostedt, Ingo Molnar
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes
2009-03-26 18:13 ` Pekka Paalanen
@ 2009-03-26 18:55 ` Vitaly Mayatskikh
0 siblings, 0 replies; 3+ messages in thread
From: Vitaly Mayatskikh @ 2009-03-26 18:55 UTC (permalink / raw)
To: Pekka Paalanen
Cc: Vitaly Mayatskikh, linux-kernel, Steven Rostedt, Ingo Molnar
At Thu, 26 Mar 2009 20:13:24 +0200, Pekka Paalanen wrote:
> 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.
Yes, fix is there. Thanks for pointing.
--
wbr, Vitaly
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-26 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26 17:22 [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes Vitaly Mayatskikh
2009-03-26 18:13 ` Pekka Paalanen
2009-03-26 18:55 ` Vitaly Mayatskikh
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®