aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 49491fa7daa2..b979426d16c6 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1567,6 +1567,10 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
1567 1567
1568 put_online_cpus(); 1568 put_online_cpus();
1569 } else { 1569 } else {
1570 /* Make sure this CPU has been intitialized */
1571 if (!cpumask_test_cpu(cpu_id, buffer->cpumask))
1572 goto out;
1573
1570 cpu_buffer = buffer->buffers[cpu_id]; 1574 cpu_buffer = buffer->buffers[cpu_id];
1571 1575
1572 if (nr_pages == cpu_buffer->nr_pages) 1576 if (nr_pages == cpu_buffer->nr_pages)
@@ -2816,7 +2820,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_enable);
2816 * to the buffer after this will fail and return NULL. 2820 * to the buffer after this will fail and return NULL.
2817 * 2821 *
2818 * This is different than ring_buffer_record_disable() as 2822 * This is different than ring_buffer_record_disable() as
2819 * it works like an on/off switch, where as the disable() verison 2823 * it works like an on/off switch, where as the disable() version
2820 * must be paired with a enable(). 2824 * must be paired with a enable().
2821 */ 2825 */
2822void ring_buffer_record_off(struct ring_buffer *buffer) 2826void ring_buffer_record_off(struct ring_buffer *buffer)
@@ -2839,7 +2843,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_off);
2839 * ring_buffer_record_off(). 2843 * ring_buffer_record_off().
2840 * 2844 *
2841 * This is different than ring_buffer_record_enable() as 2845 * This is different than ring_buffer_record_enable() as
2842 * it works like an on/off switch, where as the enable() verison 2846 * it works like an on/off switch, where as the enable() version
2843 * must be paired with a disable(). 2847 * must be paired with a disable().
2844 */ 2848 */
2845void ring_buffer_record_on(struct ring_buffer *buffer) 2849void ring_buffer_record_on(struct ring_buffer *buffer)