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
On Thu, 26 Mar 2009 18:22:18 +0100
Vitaly Mayatskikh <[email protected]> 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/
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