diff options
-rw-r--r-- | kernel/trace/trace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 36c213fbfce7..a5411b7414b1 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1571,6 +1571,9 @@ void trace_printk_init_buffers(void) | |||
1571 | 1571 | ||
1572 | pr_info("ftrace: Allocated trace_printk buffers\n"); | 1572 | pr_info("ftrace: Allocated trace_printk buffers\n"); |
1573 | 1573 | ||
1574 | /* Expand the buffers to set size */ | ||
1575 | tracing_update_buffers(); | ||
1576 | |||
1574 | buffers_allocated = 1; | 1577 | buffers_allocated = 1; |
1575 | } | 1578 | } |
1576 | 1579 | ||
@@ -3030,6 +3033,10 @@ static int __tracing_resize_ring_buffer(unsigned long size, int cpu) | |||
3030 | */ | 3033 | */ |
3031 | ring_buffer_expanded = 1; | 3034 | ring_buffer_expanded = 1; |
3032 | 3035 | ||
3036 | /* May be called before buffers are initialized */ | ||
3037 | if (!global_trace.buffer) | ||
3038 | return 0; | ||
3039 | |||
3033 | ret = ring_buffer_resize(global_trace.buffer, size, cpu); | 3040 | ret = ring_buffer_resize(global_trace.buffer, size, cpu); |
3034 | if (ret < 0) | 3041 | if (ret < 0) |
3035 | return ret; | 3042 | return ret; |