Skip to content

Commit

Permalink
tracing: fix seq read from trace files
Browse files Browse the repository at this point in the history
The buffer used by trace_seq was updated incorrectly. Instead
of consuming what was actually read, it consumed the rest of the
buffer on reads.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
  • Loading branch information
Steven Rostedt committed Mar 5, 2009
1 parent 2dc5d12 commit e74da52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)

cnt -= ret;

s->readpos += len;
s->readpos += cnt;
return cnt;
}

Expand All @@ -380,7 +380,7 @@ ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
if (!ret)
return -EFAULT;

s->readpos += len;
s->readpos += cnt;
return cnt;
}

Expand Down

0 comments on commit e74da52

Please sign in to comment.