summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-08-14 11:46:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-09 10:32:41 +0200
commit8d02bd8d4a6c5a9173405a0cf36751a880671235 (patch)
tree082c348cffbfd39fc2588f92c7d62d7c794ef67c
parent5ad671c8520d49ef4d50f8d30a3f82288d9289a5 (diff)
downloadlinux-stable-8d02bd8d4a6c5a9173405a0cf36751a880671235.tar.gz
linux-stable-8d02bd8d4a6c5a9173405a0cf36751a880671235.tar.bz2
linux-stable-8d02bd8d4a6c5a9173405a0cf36751a880671235.zip
perf auxtrace: Fix queue resize
commit 99cbbe56eb8bede625f410ab62ba34673ffa7d21 upstream. When the number of queues grows beyond 32, the array of queues is resized but not all members were being copied. Fix by also copying 'tid', 'cpu' and 'set'. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Fixes: e502789302a6e ("perf auxtrace: Add helpers for queuing AUX area tracing data") Link: http://lkml.kernel.org/r/20180814084608.6563-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/perf/util/auxtrace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index d056447520a2..eeb6d1f7cfb3 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -202,6 +202,9 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
for (i = 0; i < queues->nr_queues; i++) {
list_splice_tail(&queues->queue_array[i].head,
&queue_array[i].head);
+ queue_array[i].tid = queues->queue_array[i].tid;
+ queue_array[i].cpu = queues->queue_array[i].cpu;
+ queue_array[i].set = queues->queue_array[i].set;
queue_array[i].priv = queues->queue_array[i].priv;
}