summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-10-21 19:53:34 +0200
committerIngo Molnar <mingo@kernel.org>2012-10-21 19:53:34 +0200
commitef8ff74ed8dd9d4b3ba8cb9f2fc927a27c697a8b (patch)
tree0c000fb23d1c40545093a8042b7a98ea11b0e0e0 /kernel
parentMerge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
parentring-buffer: Check for uninitialized cpu buffer before resizing (diff)
downloadlinux-ef8ff74ed8dd9d4b3ba8cb9f2fc927a27c697a8b.tar.xz
linux-ef8ff74ed8dd9d4b3ba8cb9f2fc927a27c697a8b.zip
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
Pull ftrace ring-buffer resizing fix from Steve Rostedt. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ring_buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index b32ed0e385a5..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,
put_online_cpus();
} else {
+ /* Make sure this CPU has been intitialized */
+ if (!cpumask_test_cpu(cpu_id, buffer->cpumask))
+ goto out;
+
cpu_buffer = buffer->buffers[cpu_id];
if (nr_pages == cpu_buffer->nr_pages)