OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79a3aaa
)
ring-buffer: Fix ring buffer size in rb_write_something()
author
YueHaibing
<yuehaibing@huawei.com>
Sun, 23 Sep 2018 12:11:33 +0000
(12:11 +0000)
committer
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Tue, 2 Apr 2019 22:24:06 +0000
(18:24 -0400)
'cnt' should be used to calculate ring buffer size rather than data->cnt
Link:
http://lkml.kernel.org/r/1537704693-184237-1-git-send-email-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c
patch
|
blob
|
history
diff --git
a/kernel/trace/ring_buffer.c
b/kernel/trace/ring_buffer.c
index
41b6f96
..
4f33d7d
100644
(file)
--- a/
kernel/trace/ring_buffer.c
+++ b/
kernel/trace/ring_buffer.c
@@
-4979,7
+4979,7
@@
static __init int rb_write_something(struct rb_test_data *data, bool nested)
cnt = data->cnt + (nested ? 27 : 0);
/* Multiply cnt by ~e, to make some unique increment */
- size = (
data->
cnt * 68 / 25) % (sizeof(rb_string) - 1);
+ size = (cnt * 68 / 25) % (sizeof(rb_string) - 1);
len = size + sizeof(struct rb_item);