projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dc5d12
)
tracing: fix seq read from trace files
author
Steven Rostedt
<srostedt@redhat.com>
Thu, 5 Mar 2009 01:31:11 +0000
(20:31 -0500)
committer
Steven Rostedt
<srostedt@redhat.com>
Thu, 5 Mar 2009 01:31:11 +0000
(20:31 -0500)
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>
kernel/trace/trace.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 57155dc53530d2114f79b85e290bbbc685b661a4..2e53e6f094403801b37fb543ec9055c03b77f339 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-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;
}
@@
-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;
}