diff options
Diffstat (limited to 'kernel/trace/seq_buf.c')
-rw-r--r-- | kernel/trace/seq_buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/seq_buf.c b/kernel/trace/seq_buf.c index 9ec5305..ce17f65 100644 --- a/kernel/trace/seq_buf.c +++ b/kernel/trace/seq_buf.c @@ -328,7 +328,7 @@ int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, int cnt) if (s->len <= s->readpos) return -EBUSY; - len = s->len - s->readpos; + len = seq_buf_used(s) - s->readpos; if (cnt > len) cnt = len; ret = copy_to_user(ubuf, s->buffer + s->readpos, cnt); |