diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b42d42056fa4..d664aae2e10a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2905,7 +2905,7 @@ tracing_entries_read(struct file *filp, char __user *ubuf, | |||
2905 | char buf[64]; | 2905 | char buf[64]; |
2906 | int r; | 2906 | int r; |
2907 | 2907 | ||
2908 | r = sprintf(buf, "%lu\n", tr->entries); | 2908 | r = sprintf(buf, "%lu\n", tr->entries >> 10); |
2909 | return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); | 2909 | return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); |
2910 | } | 2910 | } |
2911 | 2911 | ||
@@ -2945,6 +2945,9 @@ tracing_entries_write(struct file *filp, const char __user *ubuf, | |||
2945 | atomic_inc(&max_tr.data[cpu]->disabled); | 2945 | atomic_inc(&max_tr.data[cpu]->disabled); |
2946 | } | 2946 | } |
2947 | 2947 | ||
2948 | /* value is in KB */ | ||
2949 | val <<= 10; | ||
2950 | |||
2948 | if (val != global_trace.entries) { | 2951 | if (val != global_trace.entries) { |
2949 | ret = ring_buffer_resize(global_trace.buffer, val); | 2952 | ret = ring_buffer_resize(global_trace.buffer, val); |
2950 | if (ret < 0) { | 2953 | if (ret < 0) { |