Commit 9ba05414 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'tip/perf/urgent' of...

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: default avatarIngo Molnar <mingo@kernel.org>
parents f9369910 6a31e1f1
...@@ -1486,6 +1486,11 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, ...@@ -1486,6 +1486,11 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
if (!buffer) if (!buffer)
return size; return size;
/* Make sure the requested buffer exists */
if (cpu_id != RING_BUFFER_ALL_CPUS &&
!cpumask_test_cpu(cpu_id, buffer->cpumask))
return size;
size = DIV_ROUND_UP(size, BUF_PAGE_SIZE); size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
size *= BUF_PAGE_SIZE; size *= BUF_PAGE_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment