aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-05-24 03:06:24 -0400
committerIngo Molnar <mingo@kernel.org>2012-05-24 03:06:24 -0400
commit9ba0541453b3a57797701b9fbc0fd8d0be173050 (patch)
tree29cc15e3d9b05d78f8adb8516baf6c1a3d7626a9 /kernel/trace
parentf9369910a6225b8d4892c3f20ae740a711cd5ace (diff)
parent6a31e1f135d1abfb5137697f889c8cd5d72eb522 (diff)
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
Pull an ftrace ring-buffer fix from Steve Rostedt: * fix kernel crash when changing the size of the ring-buffer on boxes where possible_cpus != online_cpus. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ring_buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 6420cda62336..1d0f6a8a0e5e 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1486,6 +1486,11 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
1486 if (!buffer) 1486 if (!buffer)
1487 return size; 1487 return size;
1488 1488
1489 /* Make sure the requested buffer exists */
1490 if (cpu_id != RING_BUFFER_ALL_CPUS &&
1491 !cpumask_test_cpu(cpu_id, buffer->cpumask))
1492 return size;
1493
1489 size = DIV_ROUND_UP(size, BUF_PAGE_SIZE); 1494 size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
1490 size *= BUF_PAGE_SIZE; 1495 size *= BUF_PAGE_SIZE;
1491 1496