linux_dsm_epyc7002/tools/perf/arch/x86
Thomas Richter 81fccd6ca5 perf record: Fix failed memory allocation for get_cpuid_str
In x86 architecture dependend part function get_cpuid_str() mallocs a
128 byte buffer, but does not check if the memory allocation succeeded
or not.

When the memory allocation fails, function __get_cpuid() is called with
first parameter being a NULL pointer.  However this function references
its first parameter and operates on a NULL pointer which might cause
core dumps.

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>
Link: http://lkml.kernel.org/r/20180117131611.34319-1-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-01-17 10:31:25 -03:00
..
annotate Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
entry/syscalls License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
include Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
tests perf evlist: Remove 'overwrite' parameter from perf_evlist__mmap 2017-12-05 15:43:53 -03:00
util perf record: Fix failed memory allocation for get_cpuid_str 2018-01-17 10:31:25 -03:00
Build perf tests: Add arch tests 2015-10-05 16:55:38 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00