[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zlf8kxmd.wl%vmayatsk@redhat.com>
Date: Thu, 26 Mar 2009 18:22:18 +0100
From: Vitaly Mayatskikh <v.mayatskih@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Pekka Paalanen <pq@....fi>
Subject: [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists