mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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

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®