diff options
author | Thomas Richter <tmricht@linux.vnet.ibm.com> | 2018-02-19 11:24:44 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-02-19 13:16:01 +0100 |
commit | 47812e00910407a0f14906c0a3bf2d803a616c6f (patch) | |
tree | d86236dca8dfcb956b1e7dc293c770368919279c | |
parent | Merge tag 'perf-core-for-mingo-4.17-20180216' of git://git.kernel.org/pub/scm... (diff) | |
download | linux-47812e00910407a0f14906c0a3bf2d803a616c6f.tar.xz linux-47812e00910407a0f14906c0a3bf2d803a616c6f.zip |
perf s390: Fix reading cpuid model information
Commit eca0fa28cd0d (perf record: Provide detailed information on s390
CPU") fixed a build error on Ubuntu. However the fix uses the wrong
size to print the model information.
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Fixes: eca0fa28cd0d ("perf record: Provide detailed information on s390 CPU")
Link: http://lkml.kernel.org/r/20180219102444.96900-1-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/arch/s390/util/header.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/arch/s390/util/header.c b/tools/perf/arch/s390/util/header.c index 231294b80dc4..a4c30f1c70be 100644 --- a/tools/perf/arch/s390/util/header.c +++ b/tools/perf/arch/s390/util/header.c @@ -81,7 +81,7 @@ int get_cpuid(char *buffer, size_t sz) line2 = line + strlen(SYSINFO_MODEL); while ((cp = strtok_r(line2, "\n ", &line2))) { - mdsize += scnprintf(model + mdsize, sizeof(type) - mdsize, + mdsize += scnprintf(model + mdsize, sizeof(model) - mdsize, "%s%s", model[0] ? "," : "", cp); } break; |