mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
perf s390: Fix reading cpuid model information
Commiteca0fa28cd
(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:eca0fa28cd
("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>
This commit is contained in:
parent
11737ca9e3
commit
47812e0091
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue